Open and close window

I

Ivan Sutton

Hi,

I'm quite new to Java:
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)

Thank you,

Ivan
 
L

Lasse Reichstein Nielsen

I'm quite new to Java:

Good for you, but this newsgroup is about Javascript :)
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top