SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Evangelist mumford1's Avatar
    Join Date
    Sep 2002
    Location
    UK
    Posts
    567
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    List Item - I want to loose the focus when an option has been clicked.

    Hi

    I have a list item menu. When the user selects one of the options i don't want it to stay selected (you know when it turns blue in IE).

    The reason for this alot of people have the scroll mouses now, and it is annoying when you select something in a drop down menu, then use your scroll mouse to scroll down the page, but you find your still in the drop down menu.

    Does this make any sense!

  2. #2
    SitePoint Enthusiast m0n5t3r's Avatar
    Join Date
    Jul 2003
    Location
    Romania
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This should do it:
    Code:
    <select name="whatever" onchange="this.blur()">
    <option value="aaa">aaa</option>
    <option value="bbb">bbb</option>
    </select>
    (I've tested in Opera and Mozilla 1.4, I don't have iexplore at hand right now...)

    Edit:

    It also works in IE6
    Last edited by m0n5t3r; Jul 29, 2003 at 09:26.

  3. #3
    SitePoint Evangelist mumford1's Avatar
    Join Date
    Sep 2002
    Location
    UK
    Posts
    567
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply.

    I have just copied that code, but it dosen't work. When you select an option it is still hightlighted blue?

  4. #4
    SitePoint Wizard bronze trophy
    Join Date
    Apr 2003
    Posts
    4,095
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, but scrolling won't cause the drop-down list to scroll.

  5. #5
    SitePoint Evangelist mumford1's Avatar
    Join Date
    Sep 2002
    Location
    UK
    Posts
    567
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it does if you have a scroller on your mouse

  6. #6
    SitePoint Wizard bronze trophy
    Join Date
    Apr 2003
    Posts
    4,095
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not with the blur(); it won't.

  7. #7
    SitePoint Evangelist mumford1's Avatar
    Join Date
    Sep 2002
    Location
    UK
    Posts
    567
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Believe me it does! I copied that exact code, viewed the page click on on eof the drop down options and voila it remained blue (selected).

  8. #8
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it seems to be a bug in IE...
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  9. #9
    SitePoint Wizard bronze trophy
    Join Date
    Apr 2003
    Posts
    4,095
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Then how come it works on my machine? Microsoft Windows XP Professional SP1, Microsoft Internet Explorer 6.


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
  •