If you want an onclick, try this:
Code:
<html>
<head>
<script type="text/javascript">
var rang;
window.onload=function()
{
rang=document.forms[0];
rang[1].onclick=function()
{
process(rang[0].options[rang[0].selectedIndex].value);
}
}
function process(url)
{
location.href=url;
}
</script>
</head>
<body>
<form name="form1"><select
style="background-color: transparent; font-size: 10px; color:#222; font-family: verdana;"
name="menu">
<option value="#">Quick Links</option>
<option value="http://www.yahoo.com">Yahoo</option>
<option value="http://www.google.com">Google</option>
<option value="http://www.dynamicdrive.com">Dynamic Drive</option>
<option value="http://www.dynamicdrive.com/forums">Forums</option>
</select>
<input style="font-size: 8px; color: rgb(255, 255, 255); font-family: verdana; background-color: #333;"
onclick="document.location.href=document.form1.menu.options[document.form1.menu.selectedIndex].value;"
value="GO" type="button">
</form>
</body>
</html>
...If you want an onchange.. use this:
Code:
<html>
<head>
<script type="text/javascript">
var rang;
window.onload=function()
{
rang=document.forms[0];
rang[0].onchange=function()
{
process(this.value);
}
}
function process(url)
{
location.href=url;
}
</script>
</head>
<body>
<form name="form1"><select
style="background-color: transparent; font-size: 10px; color:#222; font-family: verdana;"
name="menu">
<option value="#">Quick Links</option>
<option value="http://www.yahoo.com">Yahoo</option>
<option value="http://www.google.com">Google</option>
<option value="http://www.dynamicdrive.com">Dynamic Drive</option>
<option value="http://www.dynamicdrive.com/forums">Forums</option>
</select>
</form>
</body>
</html>
See if it helps
Bookmarks