SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2006
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    using onkeypress for jumpmenu in order to validate??

    Hi

    i have this jumpmenu:
    Code:
                  <form action="#" method="get">
                  <div id="search">
                   <label for="quicklinks">Quick Links</label>
                   <select name="quicklinks" id="quicklinks" >
                       <option value="#" class="bgcolor">Please choose...</option>
                       <option value="#dearth">Kids Area</option>
                       <option value="#fabric">Fabric</option>
                       <option value="#workshops">Workshops</option>
                       <option value="#street">Street Theatre</option>
                       <option value="#sports">Sports</option>
                    </select>
                    <input type="button" name="go_button" id= "go_button" value="Go" onclick="MM_jumpMenuGo('quicklinks','parent',0)"  onkeypress="MM_jumpMenuGo('quicklinks','parent',0)" />
                     </div>
                  </form>
    It won't validate with just the onClick event but when i add the onkeypress it does validate but for some reason i still can't get the button to work without a mouse click???
    Is there something else wrong with the code?

    Thanks for any help

  2. #2
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    As far as I recall, IE registers keyboard presses with the space bar as mouse clicks, so that may be the reason.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!


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
  •