Select Option Navigation Menu

This is a Javascript menu that uses a select/option form component to create a drop-down navigation menu. Any number of menus can be added to a single web page to create a fast/efficient navigation system, that downloads quickly and requires no external files.

Requested by Alexis Argent (www.keison.co.uk)

Script Example

Search Engines

Links

JavaScript Examples


Javascript installation

Step #1 - Copy this code into the head section of your web page.

<script>
function changeLocation(menuObj)
{
   var i = menuObj.selectedIndex;

   if(i > 0)
   {
      window.location = menuObj.options[i].value;
   }
}
</script>

Step #2 - Copy this code into the body section of your web page, in the place where you like the menu to show on screen.

<select onChange="javascript:changeLocation(this)">
   <option selected>Visit a search engine</option>
   <option value="http://google.com">Google</option>
   <option value="http://altavista.com">Altavista</option>
   <option value="http://ask.co.uk">Ask Jeeves</option>
</select>

Step #3 - Modify the code from step #2, to use the links that your require in your menu. You can more option tags to show more items on the menu.

Step #4 - If you require more than on menu, then repeat steps #2 and #3.

Download Script