View Full Version : IE, window.blur, window.close() and location change

07-28-2006, 01:21 PM
Iíve got a page that opens a popup when you click a link. The popup displays an image and a list of links to other images (that reload in the same popup). The popup window also has an on blur event attached to it which closes the window if someone clicks off the window.

All works fine in FF, but in IE changing the location of the window (by clicking one of the links) also closes the window. Itís as if changing location activates the on blur event as well, which surely it shouldnít.

Anyone got any ideas how to fix this? Thanks,

07-28-2006, 09:26 PM
maybe opener.onblur(); opener.close();

or placing in the new main popup:


or for the new display reload popup:


07-31-2006, 12:10 PM

I got it to work in the end by getting it to trigger window.close() on the opener.focus event rather than the window.blur event.