View Single Post
Old 07-02-2009, 09:18 AM   #1 (permalink)
RickStick
Registered User
 
Join Date: Jul 2009
Posts: 3
OS: vista


HTML - Drop Down Menu Question

How do I cause an option in a drop down menu to do nothing at all? In other words, when the user selects that link and clicks go, I want nothing to happen at all. Here's the code:

Code:
<select name="ComprehensiveList"ONCHANGE="window.open(this.options[this.selectedIndex].value)">
<option value=""selected>&lt;select&gt;</option>
<option value="www.whatever.com">Option1</option>
<option value="www.whatever.com">Option2</option>
</select>
The second line of code is the one I can't figure out how to deal with. Notice that I use the 'onchange' command. As it stands, "select" pre-populates the space as the first drop down menu option. I do not want a blank window to open if the user re-selects "select" (which is what happens now). Rather, I want "select" to do nothing if the user re-selects it.

Thank you for your help.
RickStick is offline   Reply With Quote
Important Information
Join the #1 Tech Support Forum Today - It's Totally Free!

TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free.

Join TechSupportforum.com Today - Click Here