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!

popup window opening in referring window

Status
Not open for further replies.

CWebster

Programmer
Jun 12, 2002
38
GB
when the user clicks on the popup, we can ensure that the new page pops up in the referring window by using:

window.opener.location.href = "http......"

but what if the user has already closed the referring window? nothing happens when they then click on the popup.

What's the way around this?
 
hi CWebster,
try this:


var o = window.opener;

if (o && o.open && !o.closed)
o.location.href = "http...";
else
window.open("http...","winName","height=...,width=...") ======================================

if (!succeed) try();
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top