473,569 Members | 2,751 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 7628
"Thang Nguyen" <th************ **@yahoo.com> wrote in message
news:40******** *************** ***@posting.goo gle.com...
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
automaticall y 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
3162
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 the datagrid content in a CSV file and forces the user to download the file. The following is the code used to force a download: 'strCadena...
4
3348
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 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...
28
14233
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 happen!!---
4
2865
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 (WebLogic Portal 7), I can not use it as it is already being used and is only called once by the browser(so I believe). What I am essentially trying to...
4
3726
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(){ window.open('xxx.php','xxx','menubar=no,scrollbars=no,resizable=no');
4
4235
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 some operation . Once the operation is done, i have to close the child window, and refresh the parent window automatically. I am able to close the...
7
2510
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 what I'm doing wrong? Here is a sample snippet of code where the user can return to the main form while simultaneously closing the previous form.
1
7421
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 # ---------------------------------------------------------------------- # Script "shortcut.py" import os
1
9706
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 close only one file, not both? What command line should I use in command promt? Thank you.
0
7694
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7921
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8118
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7666
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6278
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2107
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.