Dropdown menu with autoforward?

Discussion in 'HTML & Website Design' started by Johnburk, Feb 12, 2006.

  1. #1
    Does anyone know the code to make a dropdown menu where the selection automaticly forwards to that specific page?

    Example: nti.nl/NTinternet
     
    Johnburk, Feb 12, 2006 IP
  2. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #2
    Javascript onhover or onclick maybe?
     
    noppid, Feb 12, 2006 IP
  3. Johnburk

    Johnburk Peon

    Messages:
    777
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I copy and pasted the following code from the source files of that site, but it is not working for me :(

    
    </select><select name="niveau" onchange="__doPostBack('niveau','')" language="javascript" id="niveau" class="inputhp">
    	<option value="Zoek op niveau">Zoek op niveau</option>
    	<option value="/NTInternet/Cursussen/">Cursussen</option>
    	<option value="/NTInternet/MBO/">MBO</option>
    	<option value="/NTInternet/HBO/">HBO</option>
    	<option value="/NTInternet/University/">Universitair</option>
    
    Code (markup):
     
    Johnburk, Feb 12, 2006 IP
  4. Webable

    Webable Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Here's a short explanation on how it works, you need a little more then just the bit you copied: http://www.quirksmode.org/js/select.html
     
    Webable, Feb 12, 2006 IP
  5. 2ndPlatform

    2ndPlatform Peon

    Messages:
    138
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Not sure if this will help - I usually just use what's in Dreamweaver, it writes pretty clean and functional code...

    Here's your dropdown:

    Then here's the script you need either on the page or in an external .js file that you call from your page.

     
    2ndPlatform, Feb 12, 2006 IP
    Johnburk likes this.