954,170 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

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

spikes
Junior Poster
106 posts since Jul 2003
Reputation Points: 11
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You