ketankshah
IS-IT--Management
I want to close a popup window which was opened from window A, on onload event of window B. How can I do that?
My code is as below:
WindowA.htm
-----------
<HTML>
<BODY>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function gotonext(){
test = window.open("..\popup.htm","test",'scrollbars=no,width=499,height=500,left=0,top=0');
window.location = "WindowB.htm"
}
//-->
</SCRIPT>
<form action="javascript:gotonext()" method="post">
<input type="Submit" value="OK">
</form>
</BODY>
</HTML>
WindowB.htm
-----------
<HTML>
<BODY onload='window.opener.test.close()'>
Data retrieved
</BODY>
Popup.htm
-----------
<HTML>
<BODY onload='window.opener.test.close()'>
Please Wait ....
</BODY>
My code is as below:
WindowA.htm
-----------
<HTML>
<BODY>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function gotonext(){
test = window.open("..\popup.htm","test",'scrollbars=no,width=499,height=500,left=0,top=0');
window.location = "WindowB.htm"
}
//-->
</SCRIPT>
<form action="javascript:gotonext()" method="post">
<input type="Submit" value="OK">
</form>
</BODY>
</HTML>
WindowB.htm
-----------
<HTML>
<BODY onload='window.opener.test.close()'>
Data retrieved
</BODY>
Popup.htm
-----------
<HTML>
<BODY onload='window.opener.test.close()'>
Please Wait ....
</BODY>