Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Close Window button in jsp

Options
  • 16-05-2007 11:45am
    #1
    Registered Users Posts: 1,552 ✭✭✭


    How do I get a close window button in a jsp to actually close the window.
    It doesn't do anything when I press it.

    This is the code Im using for it.
    <form>
    		<input type="button" value="Close Window" onclick="javascript:window.close();">
    </form>
    
    
    


Comments

  • Moderators, Politics Moderators Posts: 39,822 Mod ✭✭✭✭Seth Brundle


    Its JavaScript not JSP (Java Server Pages). JSP is server side based.
    Anyhow, there are certain security restrictions for using the close () method.

    The close method closes only windows opened by JavaScript using the open method. If you attempt to close any other window, a confirm message is displayed, asking the user to choose whether the window is to be closed or not.

    Maybe this will help: http://blogs.x2line.com/al/articles/350.aspx


Advertisement