SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot redeyes's Avatar
    Join Date
    Dec 2001
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Remove focus from select

    I have a rather long page.. so I have added a jump menu to the top to allow users to jump to a particular part of the page. The form is submitted on change.

    The problem I am having is that I cannot work out how to remove the focus from the menu.. which means a user scrolling with a mouse wheel will jump to the different anchors instead of being able to scroll thru the text they are reading..

    I have tried to use..

    Code:
    onchange="jumpmenu('parent',this,0);this.blur()
     
    //jumpmenu is a function in an external js file
    .. but this doesnt seem to work.. If anyone can help that would be great.

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <select onchange="self.location.hash=options[selectedIndex].value;self.focus()">
    <option value="">choose</option>
    <option value="#one">one</option>
    <option value="#two">two</option>
    <option value="#three">three</option>
    </select>
    ::: certified wild guess :::

  3. #3
    SitePoint Zealot redeyes's Avatar
    Join Date
    Dec 2001
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, that did the trick!


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
  •