How can I.....(HTML Form)

liunx

Guest
Hi there,<br />
I have created an HTML page for my web site. The contents of that page is too long. So I have decided to have a drop down menu on the top of the page. This will allow user to go to specific part of the page using that # attribute in HTML.(making sense so far??)<br />
<br />
But for one or the other reason, my JavaScript which is called when an item in drop down menu is selected is not working. I dont want to have simple links on the top of the page. Would really like to have a drop down menu.<br />
<br />
So can anyone please tell me how to use drop down menu in a way that when user selects an item from it, it goes to a specific section of that same page......<br />
Thnks.<!--content--><form name="jump"><br />
<select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO"><br />
<br />
<option value="index.html">HOME</option><br />
<br />
</select><br />
</form><!--content-->not sure if it will work like that. you could try and see what you get. but just to expand on what Trans said add some more to it. also remember you need the anchor in the spot on the page you are calling.<br />
<br />
<option value="#spot1">Spot 1</option><br />
<option value="#spot2">Spot 2</option><br />
<br />
<br />
<a name=spot1></a><br />
<br />
<a name=spot2></a><!--content-->Originally posted by scoutt <br />
not sure if it will work like that. you could try and see what you get. but just to expand on what Trans said add some more to it. also remember you need the anchor in the spot on the page you are calling.<br />
<br />
<option value="#spot1">Spot 1</option><br />
<option value="#spot2">Spot 2</option><br />
<br />
<br />
<a name=spot1></a><br />
<br />
<a name=spot2></a> <br />
the BraveScoutt has ALL the RIGHT answers!:rocker:<!--content-->Thank you for replying. I have tried both codes but the page remains still and does not move to the selected part. any more ideas??<!--content-->If the answers from the forums do not work then the best thing to do is to go to a Javascript web site:<br />
<br />
<!-- w --><a class="postlink" href="http://www.javascript.com">www.javascript.com</a><!-- w --><br />
<!-- w --><a class="postlink" href="http://www.javascripts.com">www.javascripts.com</a><!-- w --><br />
<br />
or even a DHTML site<br />
<br />
Good luck<!--content-->Hi Guys.<br />
I have figured out the solution. It was just a minor minor mistake.HUH!!!!!!<br />
It was just that I had not data between <br />
<a name="spot1">SPOT</A><br />
<br />
Now I have a Table as a data in the place of SPOT.Thanks n e way guys.<!--content-->you could also add this instead of spot<br />
<br />
&nbsp;<!--content-->
 
Back
Top