webmaster resources tips and articles
webmaster information

Path = Home : Javascript Tips > Drop Down Menu


Creating An Automatic Drop Down Navigation Menu



Web Source Web Design Tips
by Shelley Lowery

This is a simple navigation script that will redirect your visitors with a drop down menu that will automatically advance to the selected page without a submit button.

Place this script where you'd like your menu to appear. You can add as many links as you like, but keep in mind
you must use full URLs, starting with "http," when linking to web sites outside of your own.

<SCRIPT LANGUAGE="JavaScript">

function AutoLink()
{
var number = document.FormAdvance.WebLink.selectedIndex;
location.href = document.FormAdvance.WebLink.options[number].value;
}
</SCRIPT>

<FORM NAME="FormAdvance">
<SELECT NAME="WebLink" onChange="AutoLink(this.form)" >
<OPTION SELECTED>Choose a Link
<OPTION VALUE="yourpage1.html"> Page One
<OPTION VALUE="yourpage2.html"> Page Two
<OPTION VALUE="http://www.outsidelink.com/go.html"> Page Three
</SELECT>
</FORM>


Tip provided by: Web Source: Your Guide to Professional Web Design and Development. http://www.web-source.net


 

 

© janim.net 2000 - 2008 All rights reserved