Results 1 to 4 of 4

Thread: Close current window

  1. #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

  2. #2
    Join Date
    Nov 2000
    Try the ASP forum.

  3. #3
    Can you use JavaScript?

    <script language="javascript">
    function CloseWin()
    <input type="button" value="Close" onClick="javascript:CloseWin();" return true";>		

  4. #4
    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

Click Here to Expand Forum to Full Width