|
-
Nov 8th, 2000, 04:42 PM
#1
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
-
Nov 8th, 2000, 10:16 PM
#2
Member
-
Nov 9th, 2000, 11:40 AM
#3
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>
-
Nov 9th, 2000, 11:58 AM
#4
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|