Connecting Tech Pros Worldwide Forums | Help | Site Map

Close Window Script

Simon Fletcher
Guest
 
Posts: n/a
#1: Jul 20 '05
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
-------!-------



DU
Guest
 
Posts: n/a
#2: Jul 20 '05

re: Close Window Script


Simon Fletcher wrote:
[color=blue]
> 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
> -------!-------
>
>[/color]

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
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/

DU
Guest
 
Posts: n/a
#3: Jul 20 '05

re: Close Window Script


HikksNotAtHome wrote:[color=blue]
> In article <bf20v3$cag$1@news.eusc.inter.net>, DU <drunclear@hotREMOVEmail.com>
> writes:
>
>[color=green]
>>Simon Fletcher wrote:
>>
>>[color=darkred]
>>>Hello there,
>>>
>>>I need a "Close Window" script ( onLoad.Close.Window() ), however i need[/color]
>>
>>the
>>[color=darkred]
>>>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
>>>-------!-------
>>>
>>>[/color]
>>
>>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.[/color]
>
>
> Try this in your browser:
>[/color]

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

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
[color=blue]
> 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.
>
>[color=green]
>>http://jibbering.com/faq/#FAQ4_14[/color]
>
>
> The FAQ is wrong in this regard.[/color]

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
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/

Closed Thread


Similar JavaScript / Ajax / DHTML bytes