Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
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,339 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