Closing a pop-up on loss of focus

admin

Administrator
Staff member
I've got a little javascript information window that pops up on the click of a button, and I want it to close when it loses the focus.

<body onBlur="window.close()"> thinks that clicking on anything inside the window counts as the window losing focus, and as my window has form controls within it, this is no good!

Is there a way of closing the window only when it is sent to the back...

Cheers.
 
Back
Top