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

closing parent window - URGENT PLEASE HELP!!!

Status
Not open for further replies.

amutinu

Programmer
Oct 19, 2001
50
0
0
US
Hi,
I am new to javascipt and am trying to close my parent window when the child window is closed. Can someone please help me. I really need to fix this by tonight as i have to submit this project to my client tomorrow.

i would really appreciate your help,

thanks,

Kiran


ON PARENT WINDOW:
floater = window.open("child.htm","","")
floater.opener = self;

ON CHILD WINDOW:
<SCRIPT FOR=window Event=onunload>
opener.close();
</SCRIPT>

so when i close the child window, i want the parent to close as well.
 
ON CHILD WINDOW:
window.opener.close()
 
Thanks snt,
I did that and now it's asking me to confirm the close. Is there a way to bypass this confirmation?

Thanks for your help

Kiran
 
the following was posted by luciddream:
it works in IE
<html>
<head>
<OBJECT id=closes type=&quot;application/x-oleobject&quot; classid=&quot;clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11&quot;>
<param name=&quot;Command&quot; value=&quot;Close&quot;>
</object>
</head>
<body>
<input type=&quot;button&quot; value=&quot;close window&quot; onclick=&quot;closes.Click();&quot;>
</body>
</html>
as far as NS goes, I have not heard of anybody being ab le to do it. --------------------------------------------------
Goals are dreams with deadlines
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top