Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

window.close()

Status
Not open for further replies.

thore

IS-IT--Management
Mar 8, 2002
6
0
0
SE
Hi,

One of my scripts opens a window and after a while i would like another javascript to close that window.
I just don´t know how to close the window.

Thank you

/T
 
Here's some code that I use and it works fine.

<HTML>
<HEAD>
<script language=&quot;javascript&quot;>
function closeIt() {
close();
}
</script>
</HEAD>
<BODY>
.
.
.
.
.
<a href=&quot;javascript:closeIt()&quot;> Close Window</a>
</body>
</html>
Mise Le Meas,

Mighty :)
 
my problem is that i want to close it automatically from another window...
 
thore, the_name_of_your_window.close()
mighty, why do you use a function ? this would be faster i guess :
<a href=&quot;javascript:document.close()&quot;>close me</a>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top