-
In an ASP, either through a link or through a button, how can I close the current window (which was not opened through the open method) - without the user geting prompted - and open a new window?
The window.close gives a message like
"The web page is trying to close the window you are currently in. Do you wish to close the window"
Thanks for any help
-
-
Can you use JavaScript?
Code:
<script language="javascript">
function CloseWin()
{
window.close();
};
</script>
<HTML>
<BODY>
<input type="button" value="Close" onClick="javascript:CloseWin();" return true";>
</BODY>
</HTML>
-
Matthew,
This still prompts the user to confirm if the window can be closed.
Acc to MSDN, when window.close() is executed in a window which was not explicitly opened wth an open statement, the user is prompted. I was wondering may be there is a way to circumvent this prompt.
Also, is there something similar to VB's cancel in form_unload
in the window object?