Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q203 Is there a way to navigate to anchors within the current page using a drop down menu?

irt.org | Knowledge Base | JavaScript | Link | Q203 [ previous next ]

Q203 Is there a way to navigate to anchors within the current page using a drop down menu?

If the anchors are called flyfishing, flytying and saltwater then try this:

<script language="JavaScript"><!--
function go() {
    location.href = '#' + document.myform.mylist.options[document.myform.mylist.selectedIndex].value;
}
//--></script>

<form name="myform">
<select name="mylist">
<option value="flyfishing">Flyfishing
<option value="flytying">Fly Tying 
<option value="saltwater">Saltwater
</select>
<input type="button" value="Submit Query" onClick="go()">
</form>

Feedback on 'Q203 Is there a way to navigate to anchors within the current page using a drop down menu?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.