Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

relationships between parent & pop up window

Status
Not open for further replies.

UncleScooby

Programmer
Jun 1, 2001
30
GB

How does javascript distinguish between which is the parent window and which is a pop up window ? If I have a parent window and a pop up window (spawned from the parent) open but then navigate to another page on the parent window this looses the relationship between the pop up window. i.e. if I try new_window_focus is doesn't pass focus back to the pop up window anymore. Whats the best way around this ?!?

Any info appreciated.

 
>>i.e. if I try new_window_focus is doesn't pass focus back to the pop up window anymore. Whats the best way around this ?!?

thats done for security reasons.

e.g.:
Page 1 opens Popup 1

Popup 1 can now access ONLY Page 1 if it is allowed access to Page 2 then there will be a security issue (Page 2 could also be a page on another site)...

Known is handfull, Unknown is worldfull
 

thanks vbkris,

is there any other way round, if I want page2 to be able to acknowledge popup1 - arent the windows labelled or named in any way or are they just referenced via their original relationship.....
 
i beleive if you open the window using the following method..
Code:
mywin = window.open('page_url','winname','attributes');

you should be able to issue
Code:
window.mywin.focus();



"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top