I just want to create a drop-down list when I select a new value inside it and this will lead me to a new web page. I don’t want the user to click the GO button to go to the page. Just select and trigger an action. How can i do this?
<form>
<p align="center"><b>Select a Site </b>
<select id="setit" style="color: #0000FF" size="1" name="test">
<option value="">Select one</option>
<option value="http://www.altavista.com">AltaVista</option>
<option value="http://www.yahoo.com">Yahoo</option>
<option value="http://www.google.com">Google</option></select>
<input type="button" value="Go"
onclick="window.open(setit.options[setit.selectedIndex].value)">
</p></form>
Here, for example, this will have a GO button and you will need to click GO to go to a new page. I do not want the GO button.
Any ideas?
source
share