Click to See Complete Forum and Search --> : Internal link in javascript


Robson
02-03-2003, 07:08 AM
I'm trying to get a dropdown box to act as an internal link selector...
Here is my code :

<form>
<select name="menu">
<option value="Doc"> Doc</option>
<option value="Flash"> Flash</option>
</select>
<input name="link to" type="button">
</form>

<br><br><br><br><br><br>
<a name="Documents">Doc section</a>
<br><br><br><br><br><br>
<a name="Flash">Flash section</a>

I'd like to select my destination inside the page with the dropdown menu and the button...How can i get this to work ?
Thank you

Robson
02-03-2003, 07:32 AM
Would you give me more info about that please ? Do you have an url I could visit ?

Thanks for the concern

pyro
02-03-2003, 07:41 AM
This code will get you started.

<html>
<head>
<script type="text/javascript">
function pulldown(form)
{
var URL = form.menu.options.value;
window.location=URL;
}
</script>
</head>
<body>
<form name=form>
<select name=menu SIZE=1 onChange="pulldown(this.form)">
<option value="#">Go to....</option>
<option value="http://www.yahoo.com">Yahoo</option>
</select>
</form>
</body>
</html>

pyro
02-03-2003, 06:02 PM
Just out of curiosity...Why would that be better?