View Full Version : close popup onblur question
mastahkaz
11-15-2002, 03:39 PM
ok i want a popup window to close when it loses screen focus, so i have onBlur="self.close()" in the body tag.
But the window will still close if any area in the window is clicked on, even though the window still has focus.
Why is this? and how can i stop it.
kdjoergensen
11-16-2002, 01:48 PM
When you move from one element to another in a page the other elements will receive a blur event call. This means that if you move a cursor over an image in your screen the body element will fire a 'blur' event.
Why don't you put a button up in your page which says "close window" ?
<form><input type="button" onclick="self.close()" value="close this window"></form>
mastahkaz
11-18-2002, 01:24 PM
because if the popup window gets lost behind other windows i just want it to close. I know i've seen it done before, i just cant' remember where.
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.