Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Close Window button in jsp

  • 16-05-2007 10:45AM
    #1
    Registered Users, Registered Users 2 Posts: 1,559 ✭✭✭


    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, Paid Member Posts: 44,518 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

    Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/ .



Advertisement