473,324 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Automatically close lauching page without IE promt

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

In article <40**************************@posting.google.com >,
th**************@yahoo.com enlightened us with...
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.

--
--
~kaeli~
The secret of the universe is @*&^^^ NO CARRIER
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
Jul 20 '05 #1
2 7602
"Thang Nguyen" <th**************@yahoo.com> wrote in message
news:40**************************@posting.google.c om...
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.
Jul 20 '05 #2
>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.


I only know of one browser (on a PC) that won't
allow me to close a window that script didn't
open. Even NN4.80 allows it. Only Mozilla and
derivatives prevent it (and not all of them). In tabbed
browsers and the likes, it closes the active tab/window
but not the browser itself.

I had the discussion with Jim a while back whether
its a bug or not (I concluded it is - but not a bug thats high
on the "to fix" list, although that conclusion was based on
Jims information - not mine) since it goes against the
prescribed behavior. But personally, I have a very
difficult time believing that something that has worked
in IE since 4.0 and in NN since 4.x series as a "bug".

<script type="text/javascript">
window.opener = window;
window.close;
</script>
--
Randy
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: mvargasp | last post by:
Hi all, I have a web form which contains a frame, (a form containing a menu on the left and a web form containing a datagrid on the right). Also there is a button (right side) which transforms...
4
by: Thang Nguyen | last post by:
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...
28
by: PerryC | last post by:
Anyone know how to auto close the parent / opener window without confirmation? I have tried: <script> opener.window.close() </script> ----I put it in the child html page, and nothing...
4
by: jadiyo | last post by:
Hi, I've read many questions about how to automatically open a new window from a page using the JavaScript onLoad command. Unfortunately, due to the web application framework being used...
4
by: vagos | last post by:
Hi, When opening a page, i want to open a new javascript window and close the first. like: <script language=javascript> function openw(){...
4
by: Sileesh | last post by:
Hi I have a btn in Parent.aspx page . On server_click() of the Btn, i am opening a new window called the child.apsx window. Child window also have a Btn. On serverClick of this Btn, I perform...
7
by: Alice | last post by:
Hi, In my program, the user can navigate to many different forms. When they go to the next form, I want the form they have left to close. However, the forms aren't closing. Can anyone tell me...
1
by: Nico Grubert | last post by:
Dear Python developers, I use a short python script in order to run an external application plus to open a browser displaying a default page. My Setup: Python 2.4.3. / Windows2000 #...
1
by: adisay76 | last post by:
I have 2 Word files opened in my Windows XP OS. I can close them both by using next comand in cmd: "taskkill winword". But this command will close both files since it kills the process. How can I...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.