Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

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

You are here: irt.org | FAQ | JavaScript | Link | Q203 [ previous next ]

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?'

©2018 Martin Webb