You need to save a reference to the window in a variable that does not go
out of scope, that is a global variable or a local one if the function it is
declared in is still running when you wish to close the window. Let's ay you
open the popup in function, call another to do some processing and then wish
to close the popup:
function getPoupupInfo()
{
var oPopup = window.open('abc.asp?filename=' + strFileName);
doSomeProcessing(); //A function to do processing
oPopup.close();
}
HTH
Joe
>From: "Siew Lien" <sl.chin@f...>
>Reply-To: "javascript" <javascript@p...>
>To: "javascript" <javascript@p...>
>Subject: [javascript] AutoClose pop up window after process
>Date: Tue, 25 Jun 2002 11:53:12 +0800
>
>Hi,
>
>I need the javascript command to autoclose the popup window after some
>process being perform.
>my code is as following, after the process, the window is still open .
>
> window.open('abc.asp?filename=' + strFileName);
>
>
>thanks.
>
>
>regs,
>siewlien
>
>
>
>
>
>---
>
>Improve your web design skills with these new books from Glasshaus.
>
>Usable Web Menus
>http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
>r-20
>Constructing Accessible Web Sites
>http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
>r-20
>Practical JavaScript for the Usable Web
>http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
>r-20
>
>
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com