You must Sign In to post a response.
  • Category: JavaScript

    Close browser window

    how to close broswer window using this window.close or anyother way...

    but one condition is dont ask confirmation for close browser
  • #580909
    window.close();
    return false;

  • #580921

    Regards,
    Rajapandian

  • #580922
    You can also do it this way:
    <a href="#" onclick="window.open('','_self','');window.close();">Close Window</a>

    Thanks and regards,
    Shreesha Mokhashi

    (Before you think of giving up, think of why you held on for so long)

  • #580923
    You can use the window.close() method.

    window.close()

    All is well.
    Thanks,
    Dharma
    Editor,Mentor,MVM
    Try and fail but don't fail and try

  • #581237
    1).If you've opened a window called my_window and want to close it later in the script, try the close() method:

    my_window.close();

    2).The word window refers to the window containing the JavaScript. This means
    you can also use JavaScript to close the window that's actually running the JavaScript, like this:
    window.close();

    This is exactly what ParentsPlace does on its site.
    If you view the source code on the page that loads into one
    of the help windows, you'll see it has a button toward the bottom, labeled 'close.'

    3).If that button were a link, the
    script would look like this:

    <a href="#" onClick="window.close(); return false;">Close me!</a>

    <FORM><INPUT TYPE="BUTTON" VALUE="Close" onClick="self.close()">

    How ParentsPlace closes its help windows
    The primary difference between ParentsPlace's code and the simple link I described is that ParentsPlace uses a
    button instead of a link.

    The button is a form element that takes an onClick, just as a link does.
    Another
    difference is that instead of using the word window before close(), ParentsPlace uses the word self.

  • #581350
    hi
    use window.close() method to close a window

    Thanks and Regards
    gypson

    Thanks and Regards
    Gypson

  • #581395
    Use Window.Close() method

  • #583031
    window.close();
    Regards
    Mr.Rajesh
    Software Engg.


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.