Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Box - No Value

Status
Not open for further replies.

iggitme

IS-IT--Management
Sep 13, 2006
47
US
Greetings: I have a select box loaded with options that have values assigned to them and some that have no values assigned to them. Is there a way to stop submit from being used if the selection chosen is an option with a value assigned to it? Thanks.
 
Hi

Code:
<select onchange="if(sv=this.options[this.selectedIndex].value)window.location.href=sv">
<option value="">Select :</option>
<option value="">-----</option>
<option value="[URL unfurl="true"]http://yahoo.com/">Yahoo!</option>[/URL]
<option value="">-----</option>
<option value="[URL unfurl="true"]http://altavista.com/">AltaVista</option>[/URL]
</select>

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top