closing a window

Reply

Join Date: Jul 2003
Posts: 106
Reputation: spikes is an unknown quantity at this point 
Solved Threads: 0
spikes's Avatar
spikes spikes is offline Offline
Junior Poster

closing a window

 
0
  #1
Oct 1st, 2003
Hi All,
Can any one give me the code for closing a browser window.

  1. function closewindow() {
  2.  
  3. if (newwindow && !newwindow.closed) {
  4.  
  5. newwindow.close()
  6.  
  7. }
  8. }
  9.  
  10.  
  11.  
  12. <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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC