SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    webdesign Percept's Avatar
    Join Date
    Jan 2003
    Location
    Belgium
    Posts
    397
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Onselect option for listmenu.

    Hi, I have a formlist and would like when a visitor selects one of the option a specific page gets loaded ( in the same window ). This is what I have:
    Code:
    <form name="form1" method="post" action="">
    <select name="select">
    <option>taal &nbsp; | &nbsp; langue &nbsp; | &nbsp; language</option>
    <option>------------------------</option> 
    <option onselect="document.open("test.html" );">Nederlands></option>
    <option>Franšais</option>
    <option>English</option>
    </select>
    </form>
    Help would be much appreciated.
    Thanks in advance.


  2. #2
    Santos L Halper Zenith's Avatar
    Join Date
    May 2002
    Location
    Finland
    Posts
    641
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <form name="form1" method="POST">
    
    <select name="myselect" OnChange="document.location.href=""document.form1.myselect.options[document.form1.myselect.options.selectedIndex].value"">
    <option value="0">- - - Please select an option - - -</option>
    <option value="www.mypage.com">Try this</option>
    </select>
    
    </form>
    



    Ok, I tried 15 min's to make thos ""'s correctly and then remove all font and div-tags this forum put to my mgs.
    Gave up. Hope you can figure out and remove extra "'s.
    For some reason this text is inside code-tag even tho the tag is closed 5 rows above. Nice

    -Z-
    Last edited by Zenith; Jul 4, 2003 at 04:02.

  3. #3
    webdesign Percept's Avatar
    Join Date
    Jan 2003
    Location
    Belgium
    Posts
    397
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks Zenith, I figured , there were to much ""

    this is what I currently have (not working yet though):

    Code:
    <form name="form1" method="POST">
    <select style="font-family: verdana; background-color: #EDEDED;font-size: 11px" name="myselect"  OnChange="document.location.href="document.form1.myselect.options[document.form1.myselect.options.selectedIndex].value"">
    <option value="0">taal &nbsp; - &nbsp; langue &nbsp; - &nbsp; language</option>
    <option value="0">----------------------------------</option>
    <option value="nl.html">&raquo; Nederlands</option>
    <option value="fr.html">&raquo; Franšais</option>
    <option value="en.html">&raquo; English</option>
    </select>
    </form>



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •