Click to See Complete Forum and Search --> : form - select value link?


jayscript
03-20-2003, 07:18 PM
Here is an example. I'm trying make a link directly to a webpage with select value drop down menu using javascript. I don't remember the exact javascript that is used.
Please advise.
<FORM>
<OPTION VALUE="index.htm" selected>by category

Is it something like this :

<OPTION VALUE=fashion_women.htm onClick="parent.location='fashion_women.htm'";>Women's Fashion

Thank you.

Jona
03-20-2003, 08:04 PM
Here:

<html><head>
<script>
function goto(){
var box = document.frmName.slct[document.frmName.slct.options.selectedIndex].value;
window.location=box
}
</script>
</head><body>
<form name="frmName">
<select size="1" name="slct" onchange="goto()">
<option value="page.html" selected>Page
<option value="blah.html">Blah
<option value="foo.html">Foo
<option value="bar.html">Bar
</select>
</form></body></html>