![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
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><select></option> <option value="www.whatever.com">Option1</option> <option value="www.whatever.com">Option2</option> </select> Thank you for your help. |
|
|
|
| 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 |
|
|
#2 (permalink) |
|
Design Team Member
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,852
OS: Vista, various linux distros
|
Re: HTML - Drop Down Menu Question
Hey, welcome to TSF. Something like this will work:
Code:
<select name="ComprehensiveList" onchange="if(this.options[this.selectedIndex].value != ''){window.open(this.options[this.selectedIndex].value)}">
<option value="" selected="selected"><select></option>
<option value="www.whatever.com">Option1</option>
<option value="www.whatever.com">Option2</option>
</select>
Cheers, Jamey |
|
|
|
|
|
#3 (permalink) |
|
Registered User
Join Date: Nov 2007
Posts: 388
OS: Mac OS X 10.5.7 and XP SP2
|
Re: HTML - Drop Down Menu Question
Either that or this:
Code:
<select name="ComprehensiveList"ONCHANGE="window.open(this.options[this.selectedIndex].value)"> <option value="" selected="selected" disabled="disabled"><select></option> <option value="www.whatever.com">Option1</option> <option value="www.whatever.com">Option2</option> </select> |
|
|
|
|
|
#4 (permalink) |
|
Design Team Member
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,852
OS: Vista, various linux distros
|
Re: HTML - Drop Down Menu Question
Haha yeah that makes sence too... I was also thinking of throwing something like this in:
Code:
<option value="" selected="selected" disabled="disabled" style="display:none;"><select></option> Cheers, Jamey |
|
|
|
![]() |
| Thread Tools | |
|
|