DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Java (http://www.daniweb.com/forums/forum9.html)
-   -   closing a window (http://www.daniweb.com/forums/thread1212.html)

spikes Oct 1st, 2003 11:49 am
closing a window
 
Hi All,
Can any one give me the code for closing a browser window.

function closewindow() {

    if (newwindow && !newwindow.closed) {

            newwindow.close()

            }
  }



<input type="button" value="close" onclick="javascript: closewindow()">

this is what i have and it dont work. also, just a point, the first time i used javascript was yesterday, so please explain the obvoius as thats probably what i'm missing here.

cheers

spikes


All times are GMT -4. The time now is 10:16 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC