SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    May 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    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:
    http://binfo01.iric.ca/~jpl/autosuggest/example3a.htm
    And the javascript code is here:
    http://binfo01.iric.ca/~jpl/autosuggest/autosuggest2.js

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

  2. #2
    SitePoint Member
    Join Date
    May 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Would anyone have any idea how to fix my 2 problems ?

    Please help !


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
  •