iv********@hotmail.com (Ivan Sutton) writes:
I'm quite new to Java:
Good for you, but this newsgroup is about Javascript :)
<URL:http://jibbering.com/faq/#FAQ2_2>
I installed a script which opened a window in a predefined format.
It works fine!
I want to know if it is possible to close that screen with java.
(however, the code should be in the childpage)
Javascript!
the Javascript code to close the current window (if it has been opened
via Javascript) is "window.close()". You can't close the original window,
at least not without the user's permission. This is to prevent a malicious
web page from closing the browser and destroying the browsing history ...
not a bad threat, but still highly annoying.
If you want a button that closes the window it is in, you can write,
e.g.:
<input type="button" value="Close Window" onclick="window.close()">
/L
--
Lasse Reichstein Nielsen -
lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'