Forum Moderators: open
And everything is just fine except, I cannot seem to find a good solution on how to handle clicking.
This is how I would like the page to respond (which is how the google model works):
When a user clicks away from the field (ex: clicks on the body of the page) the suggestion box closes. But when a user clicks on the actual suggestions in the box it remains open.
My problem is that a simple onblur event does not work on the textfield because then it closes when you try to click on a suggestion.
I tried setting a global var that goes on and off when the suggestion box receives focus so that you know if it has focus, but the onblur event that closes the box fires before the onfocus event can mark it has focused.
Any help would be appreciated, thank you