Drop Down Box with automatic redirect

Submitted by:Jhon Smith

Date added:23 May, 2011


If you're looking for a great way to enable your visitors to navigate your web site, this JavaScript drop down box with automatic redirect may be what you're looking for. This JavaScript code will enable your visitors to click on a drop down box to select the location on your web site in which they would like to navigate. Once they make their selection, the will automatically be taken to the location.

Tags: drop down , automatic redirect

Code Snippet:

<Script language="JavaScript">
<!-- Your Guide to Professional Web Site Design and Development
function goto(form) { var index=form.select.selectedIndex
if (form.select.options[index].value != "0") {
<FORM NAME="form1">
<SELECT NAME="select" ONCHANGE="goto(this.form)" SIZE="1">
<OPTION VALUE="">-------Choose a Selection-------
<OPTION VALUE="index.htm">Home
<OPTION VALUE="web_development.htm">Web Development
<OPTION VALUE="html_codes.htm">HTML Tips
<OPTION VALUE="html_codes_chart.htm">HTML Code Chart
<OPTION VALUE="javascript_codes.htm">JavaScript Codes
<OPTION VALUE="216_color_chart.htm">Color Code Chart</SELECT>