Closing a window in java script

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

Closing a window in java script

Post by pinehead18 »

I use java script to open another window. How do i close it? After a script is performed?

Thank you
Anthony
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

This and your other topic both belong in the "Client Side" forum :)
microthick
Forum Regular
Posts: 543
Joined: Wed Sep 24, 2003 2:15 pm
Location: Vancouver, BC

Post by microthick »

Say you open a window like so:

newWindow = window.open("http://www.cnn.com");

Then, you can close it by going:

newWindow.close();

More info here:
http://www.pageresource.com/jscript/j_a_02.htm
Post Reply