Close Window Script

S

Simon Fletcher

Hello there,

I need a "Close Window" script ( onLoad.Close.Window() ), however i need the
script so it don't come up with this annoying window:

"This window is trying to close" window.

Is there a script to stop this happening and close the window anyway?

Simon Fletcher
-------!-------
 
D

DU

Simon said:
Hello there,

I need a "Close Window" script ( onLoad.Close.Window() ), however i need the
script so it don't come up with this annoying window:

"This window is trying to close" window.

Is there a script to stop this happening and close the window anyway?

Simon Fletcher
-------!-------

A window opened by javascript can be closed by javascript. A window not
opened with javascript can not be closed with javascript.
A window opened by the user himself can only be closed by the user himself.

http://jibbering.com/faq/#FAQ4_14

DU
 
D

DU

HikksNotAtHome said:
Try this in your browser:

Huh... I use up to 7 different browsers. :) So, which one?
<script type="text/javascript">
window.opener = window;
window.close();
</script>

I'll try it. I think Peter-Paul Koch already mentioned this hack at his
site.

http://www.xs4all.nl/~ppk/js/croswin.html#closingopener
In a test page. IE4/5.0, it still prompts, no other browser that I have that I
can test it on does it prompt. NN4.80? No prompt. Closes the browser.




The FAQ is wrong in this regard.

Ok then. How about:

A window not opened with javascript should not be closed with javascript.
A window opened by the user himself should only be closed by the user
himself.

DU
 

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
474,077
Messages
2,570,566
Members
47,202
Latest member
misc.

Latest Threads

Top