Steve <steve@hello.co m> wrote:
[color=blue]
> Is it possible to close a page using Javascript that will close *after* the
> page is loaded (it's an ASP page that performs an action).[/color]
Christopher Benson-Manica said the following on 9/16/2005 12:04 PM:
[color=blue]
> Steve <steve@hello.co m> wrote:
>
>[color=green]
>>Is it possible to close a page using Javascript that will close *after* the
>>page is loaded (it's an ASP page that performs an action).[/color]
>
>
> <html>
> <head>
> <script>
> function ready() {
> window.close();
> }
> </script></head>
> <body onload="ready() ;">
> </body></html>
>
> ? Insert whatever actions you need to perform before window.close().[/color]
"Script is attempting to close the page......."
And yes, I can make IE close a window that script didn't open. The
Unconditional Truth will set you free if you search the archives for it.
Randy Webb <HikksNotAtHome @aol.com> wrote:
[color=blue]
> And yes, I can make IE close a window that script didn't open. The
> Unconditional Truth will set you free if you search the archives for it.[/color]
Hm, I see, although it seems that defeating protection offered by the
browser should be done with care.
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
Christopher Benson-Manica said the following on 9/16/2005 1:22 PM:[color=blue]
> Randy Webb <HikksNotAtHome @aol.com> wrote:
>
>[color=green]
>>And yes, I can make IE close a window that script didn't open. The
>>Uncondition al Truth will set you free if you search the archives for it.[/color]
>
>
> Hm, I see, although it seems that defeating protection offered by the
> browser should be done with care.[/color]
Whether that protection is offered by the browser is debatable though.
Mozilla based browsers do not allow it, in any form. Other browsers do,
and IE does it back to at least IE5.0/Win so it's hard to claim it as a
bug, and if it's not a bug then it's an undocumented feature. And IE is
not the only browser that does it.
So, if a browser intentionally allows you to do it, then how is that
browser safeguarding against it?
Steve wrote:
[color=blue]
> Is it possible to close a page using Javascript that will close *after*
> the page is loaded (it's an ASP page that performs an action).[/color]
Why not have the ASP page return a 204 response instead?
Comment