Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Open and close window

Reply
Thread Tools

Open and close window

 
 
Ivan Sutton
Guest
Posts: n/a
 
      09-17-2003
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
 
Reply With Quote
 
 
 
 
Lasse Reichstein Nielsen
Guest
Posts: n/a
 
      09-17-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) (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 - (E-Mail Removed)
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to close a TCP socket? (TCPSocket#close doesn't close it) IƱaki Baz Castillo Ruby 7 01-12-2010 01:32 PM
is better to open, write, close file than open, write, append, close? Iulian Ilea Javascript 1 12-21-2006 04:32 PM
Window.Open / Window.Close question Dave ASP .Net 11 07-13-2006 01:33 PM
open window & close prior window =?Utf-8?B?a2x5bm4=?= ASP .Net 0 10-07-2005 07:51 PM
close current window using window.close() Shang Wenbin Javascript 10 09-02-2005 12:16 AM



Advertisments