Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Mar 2005
    Location
    Brighton, UK
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IE, window.blur, window.close() and location change

    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,
    Jack

  • #2
    Regular Coder RexxCrow's Avatar
    Join Date
    Jul 2006
    Location
    California
    Posts
    275
    Thanks
    6
    Thanked 2 Times in 2 Posts
    maybe opener.onblur(); opener.close();

    or placing in the new main popup:

    window.onload=opener.close();

    or for the new display reload popup:

    self.focus();

  • #3
    Regular Coder
    Join Date
    Mar 2005
    Location
    Brighton, UK
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks.

    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •