SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Threaded View

  1. #1
    SitePoint Member
    Join Date
    May 2007
    0 Post(s)
    0 Thread(s)

    Problem scrolling through autosuggested list

    I really loved this series of articles on creating an autosuggest box and decided to use it on my website but I came over this problem:
    the suggestion list returned by my servlet is sometimes really long so I needed to put a "height: 130px; overflow: auto;" property to the div holding the suggestions.
    But now I have 2 problems:
    1. When I navigate through the list using the keyboard, the selection sometimes goes outside the displayed scroll portion.
      How do I update that to keep showing the current selection ?
    2. IE can't seem to handle mouse events inside the scroll bar and hides the suggestions whenever I click on the scrollbar buttons or the slider
      (Moz/FF handles things ok since I decided to check if the event returned a value other than "null").
      How can I fix that ? I tried many things but to no avail...

    I'm guessing this is because the script listens to mouse events...

    You can check out the working example here:
    And the javascript code is here:

    Can anyone please point me to a solution to my 2 problems ?
    Last edited by jplaverdure; May 23, 2007 at 13:48.


Posting Permissions

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