View Full Version : hide div on blur.....help!

06-25-2004, 01:06 PM

I have an even which is called onblur but it doesnt seem to be working!

basically i have menus (DIVs) that I want hidden when the page looses focus... so when the menus are showing, if the user clicks on another page or basically the main page looses focus, I need them to be hidden...

I have the hide event, but it doesnt get called when the page looses focus...


06-25-2004, 01:35 PM
What did you apply the event to? Afaik it doesn't work with eg Body, I think it was thought for use with form elements and msdn says it works with window, too. So you should do a window.onblur=yourfunction; and it should work.