Results 1 to 5 of 5

Thread: window.close

  1. #1
    MadWorm
    Guest

    Question window.close

    I have a button on a form that when clicked I want to close the browser, the browser will always be IE. Here is the code I've got,
    Code:
    <form action="javascript:null">
    <input type="button" value="Close this window" onclick="window.close();">
    </form>
    The problem is once the user clicks the button, IE asks for confirmation they want to close the browser, is there a way to bypass the confirmation? Any ideas?

  2. #2
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    No, that is built into the browser as a security measure.

  3. #3
    scoutt
    Guest
    the only way to get rid of that confirmation is if you open the window that you are closing. like a popup window. but if you didn't open that window from your page and the user did to get to your page, then the answer is no.

  4. #4
    MadWorm
    Guest
    Thanks

    That's about what I expected.

  5. #5
    BTW, that javascript:null thing isn't needed, I believe. So this should work:
    Code:
    <form name="something">

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