HighDots Forums  

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

Javascript JavaScript language (comp.lang.javascript)


Discuss how to know what the opener is loading from the opened window in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
giurax
 
Posts: n/a

Default how to know what the opener is loading from the opened window - 09-26-2003 , 10:14 AM






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.

Reply With Quote
  #2  
Old   
Richard Cornford
 
Posts: n/a

Default Re: how to know what the opener is loading from the opened window - 09-26-2003 , 10:54 AM






"giurax" <giurax (AT) yahoo (DOT) com> wrote

Quote:
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.

Quote:
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.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.