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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Multiple Windows

Status
Not open for further replies.

faiyth

Programmer
Joined
Nov 22, 2002
Messages
19
Location
US
I'm trying to reference two windows. I have a page index.html that opens up and a popup window popsup to get some JSP information. This window has a javascript that does a confirm. If the users says OK I want it to redirect index.html to another document. My code is below.. what am I doing wrong?

var anynonapproved = confirm("Is this okay?")
if(anynonapproved == true)
{
parent.location="approve00.jsp";
self.close();
}
else
{
self.close();
}

right now the popup window is redirecting itself and then closing, I want it to redirect it's "parent" window.

 
Nope, same thing. It's still redirecting my popup window instead of my index.html document.
 
gee,
how come i didn't notice it the first time - use "opener" instead of "parent" --------------------------------------------------
Goals are dreams with deadlines
-------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top