how to know what the opener is loading from the opened window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • giurax

    how to know what the opener is loading from the opened window

    Hi all,
    I am new to javascript.
    I have a window that on the 'onUnload' event opens a new window, the
    question is: have I any chance to know in the new window what page is
    the opener loading? (in the end I need to know the url of the page
    which loading triggered the onUnload event)
    thanks.
  • Richard Cornford

    #2
    Re: how to know what the opener is loading from the opened window

    "giurax" <giurax@yahoo.c om> wrote in message
    news:8713b289.0 309260714.4fd7e 23b@posting.goo gle.com...[color=blue]
    >I am new to javascript.
    >I have a window that on the 'onUnload' event opens a new window,[/color]

    That is why pop-up blocking software is so popular these days.
    [color=blue]
    >the question is: have I any chance to know in the new window
    >what page is the opener loading? (in the end I need to know
    >the url of the page which loading triggered the onUnload event)[/color]

    You chances of reading the URL of the window that attempts to open the
    pop-up are close to zero. It might have just been closed (in which case
    the user will be very annoyed that they now have another window to close
    (maybe they will decide to get themselves a pop-up blocker at that
    point, they certainly will not be left with a favourable impression of
    your site). If they are navigating away from your site you will not be
    able to read the URL of the new page because of cross-domain security
    restrictions (unless you can persuade the user to first lower the
    browser security setting to a dangerously low level (unlikely)). Which
    just leaves you with the ability to read the URL if it happens to be a
    page from your own site, and you don't need to be opening new window to
    get that information.

    Richard.


    Comment

    Working...