Automatically close lauching page without IE promt

T

Thang Nguyen

Hi,
my page contains an applet. When I click on a link on the page, the
applet will be launched.Now I need my page can be automatically closed
when I close my applet.I can call the script from my applet to do
this, but the poor thing is each time the script is called, IE will
prompt to ask "the page you are viewing try to close the window ..".
Is there any possible way for the browser not to prompt like that. I
only know that a closing a popup window will not askk anything, but I
don't know more than this. Any help is appreciated ;) !!!

Re: Automatically close lauching page without IE promt
From: kaeli
Date Posted: 12/4/2003 2:03:00 PM



Hi,
my page contains an applet. When I click on a link on the page, the
applet will be launched.Now I need my page can be automatically closed
when I close my applet.I can call the script from my applet to do
this, but the poor thing is each time the script is called, IE will
prompt to ask "the page you are viewing try to close the window ..".
Is there any possible way for the browser not to prompt like that. I
only know that a closing a popup window will not askk anything, but I
don't know more than this. Any help is appreciated ;) !!!

No. If I navigate to your page, I'd be pretty pissed if you closed my
browser without asking.
This is why javascript (default security environment) can't do that.
There may be a workaround with security/trusted sites sort of thing, but
your average settings won't allow it, nor should they.

If this is for an intranet or CD application, use an HTA. You get much
more flexibility there.

--
 
R

Richard Cornford

Thang Nguyen said:
my page contains an applet. When I click on a link on the
page, the applet will be launched.Now I need my page can be
automatically closed when I close my applet.I can call the
script from my applet to do this, but the poor thing is each
time the script is called, IE will prompt to ask "the page
you are viewing try to close the window ..". Is there any
possible way for the browser not to prompt like that. I only
know that a closing a popup window will not askk anything,
but I don't know more than this. Any help is appreciated ;)!!!
<snip>

As someone navigates their browser around they accumulate information,
most notably a history list of where they have been. If you closed that
browser window you may distort that information. It is not your
information so you should not be allowed to destroy it, and so browsers
will not normally let you close a window from a script without prompting
the user, unless you opened it with a script. That is normal and
reasonable behaviour for a browser.

Some browsers are buggy and can be hacked so that a window can be closed
without a prompt, but not all and bugs get fixed, so this is just
something that you just should not attempt to do on the Internet.

Richard.
 

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
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top