943,866 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 12826
  • Java RSS
Oct 1st, 2003
0

closing a window

Expand Post »
Hi All,
Can any one give me the code for closing a browser window.

Java Syntax (Toggle Plain Text)
  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
Similar Threads
Reputation Points: 11
Solved Threads: 2
Junior Poster
spikes is offline Offline
106 posts
since Jul 2003

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: passing information accross pages
Next Thread in Java Forum Timeline: Table of Contents Script





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC