"giurax" <gi****@yahoo.com> wrote in message
news:87**************************@posting.google.c om...
I am new to javascript.
I have a window that on the 'onUnload' event opens a new window,
That is why pop-up blocking software is so popular these days.
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)
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.