Click to See Complete Forum and Search --> : unwanted dialog w/self.close()


Jeffm
08-28-2000, 01:27 PM
I am trying to close a window with self.close() and receive the dialog:

The web page you are viewing is trying to close the window.
Do you want to close the window?

This only happens the first time I attempt to close a window. The history
has been checked with alert(window.history.length) and returns 1. I am using
IE4.

Gene
09-09-2000, 07:02 AM
"Jeffm" <jeffm@earthlink.net> wrote:
>
>I am trying to close a window with self.close() and receive the dialog:
>
>The web page you are viewing is trying to close the window.
>Do you want to close the window?
>
>This only happens the first time I attempt to close a window. The history
>has been checked with alert(window.history.length) and returns 1. I am using
>IE4.
>
>


This is a security feature which does not allow you to close a window through
script unless it was opened through script.