|
||||||||||||
Closing a windowQuestion: How do I close a window?
Answer:
To close a window that you previously opened from your script,
you can use the winRef.close();where winRef is the window reference,
as returned by the window.open() method.
The gotcha here is that the window referenced by winRef
does not necessarily exist at the time when your script attempts to close it.
(The user might well have closed it already!)
And if the window no longer exists, your script may cause errors.
Possible workarounds are the following:
If your script tries to execute
JavaScripter.net.
Copyright
© 1999-2006, Alexei Kourbatov
|