Hello guys, pls i have a dropdown field in my form, the contents are automobile, books, clothing & fashion, foods & beverages etc. i want to make each option a link so that when the visitors select any of the options, the visitor will be led to the page that contains the detail about what he selected without the visitor click on submit button.
regards
Page 1 of 1
how to make dropdown field links to other pages
#3
Posted 10 March 2010 - 09:02 PM
#4
Posted 11 March 2010 - 02:03 PM
Hi,
Yes, you will need a jump menu!
<script type="text/javascript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<form name="form" id="form">
<select name="jumpMenu" id="jumpMenu" onChange="MM_jumpMenu('parent',this,0)">
<option value="http://www.books.html">Books</option>
<option value="http://www.food.html">Food</option>
</select>
</form>
Something like this.
Yes, you will need a jump menu!
<script type="text/javascript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<form name="form" id="form">
<select name="jumpMenu" id="jumpMenu" onChange="MM_jumpMenu('parent',this,0)">
<option value="http://www.books.html">Books</option>
<option value="http://www.food.html">Food</option>
</select>
</form>
Something like this.
- ← Changing the language of a webpage.
- Server Side (PHP, Databases, ASP.NET, etc)
- How is this done? →
Share this topic:
Page 1 of 1
Help

















