Jump to content

Drop Down Menus


shadowayex

Recommended Posts

Ok, on my site at the top of a list of links to certain information, I have a drop down menu that I want to use to sort the information, I figured the easiest way would be to create separate pages and put the information in a certain order and put the drop down menu at the top of each. From there I want to make it so when they click on an option in the drop down menu is takes them to the corresponding page, kiinda like this:

<select><option vlaue="a">A</option>  <---Goes to page A<option value="b">B</option>  <---Goes to page Band so on

How exactly would you do that? I know it's like a novice question, but well, I'm a novice lol.

Link to comment
Share on other sites

It's quite simple other than spelling errors. (vlaue) :)Elsewhere and nextpage is up to you to define.<script type="text/javascript">function nextpage(){location=document.forms[0].elsewhere.value}</script></head><body><form><select id="elsewhere" onchange="nextpage()"><option>-Select location-</option><option value="/page1.html">Pagename 1</option><option value="/page2.html">Pagename 2</option><option value="/page3.html">Pagename 3</option></select></form>

Link to comment
Share on other sites

Ew that example has horrible HTML! Remember, you should always close tags such as <option>, <li>, etc. not leave them open! so it should be

<select id="gowhere" onchange="go()"><option>-Select location-</option><option value="/asp/default.asp">ASP Coding</option><option value="/flash/default.asp">Flash Tutorial</option><option value="/js/default.asp">JavaScripts</option></select>

Link to comment
Share on other sites

Not your fault - in the original tutorial it is like that lol :)(I actually started replying before you had finished your post :) )

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...