I have a layer that appears when a user enters some text into a text box. (Think google suggests).
This all works ok, the one bit i am stuck on is this. If i decide not to select an item from the list within the layer that has appeared, i cant close it.
Is there a way to know if a user has clicked outside of the layer to trigger some javascript to set the css display property to none.
I have tried using the textbox’s onblur event, even the layers onblur event.
To complicate things slightly, it is a two step drill down list, firstly it presents the user wth a set of options (categories), they select one category and the layer is then filled with items within that category.
How can i hide the layer if they dont select an item in the list?