473,385 Members | 1,355 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,385 software developers and data experts.

close browser window

Hi,

I would like to close the browser window when I open the new one. Now I'm
getting really irritation message: do I really want to close it, yes or no.
I just want to close the browser without the message.

Does anybody know the solution?

greatings,

Olga
Jul 20 '05 #1
10 2377
On Fri, 16 Jan 2004 13:13:25 +0100, "olga p." <ol********@wanadoo.nl>
wrote:
Hi,

I would like to close the browser window when I open the new one. Now I'm
getting really irritation message: do I really want to close it, yes or no.
I just want to close the browser without the message.

Does anybody know the solution?


The only windows you can close via scripting are the windows that the
scripting opens.

you cannot close the original window that the user opens with a
shortcut... (well you can but the user has the choice as you can see).
HTH
Al

Jul 20 '05 #2
Harag wrote:
On Fri, 16 Jan 2004 13:13:25 +0100, "olga p." <ol********@wanadoo.nl>
wrote:

Hi,

I would like to close the browser window when I open the new one. Now I'm
getting really irritation message: do I really want to close it, yes or no.
I just want to close the browser without the message.

Does anybody know the solution?

The only windows you can close via scripting are the windows that the
scripting opens.

you cannot close the original window that the user opens with a
shortcut... (well you can but the user has the choice as you can see).


I think, for the sake of doing it, I will keep my mouth (and fingers)
shut this time, its been beaten to death.

Needless to say, you *can* [1] close that window without a prompt.
Search the archives.

[1] In about 80% (??) of circumstances.

P.S. The Unconditional Truth might surprise you.
--
Randy

Jul 20 '05 #3
: The only windows you can close via scripting are the windows that the
: scripting opens.
:
: you cannot close the original window that the user opens with a
: shortcut... (well you can but the user has the choice as you can see).
In the past you could:

- open a child
- let the child replace the current location of the parent, not via parent..
but via the name you gave the parent.
- then try to close the parent via that name.

I may hope this bug is fixed by now for all browsers.
The browser (MSIE) just though the child became parent of it's parent.

Wouter
Jul 20 '05 #4
"DJ WIce" <co*********@djwice.com> wrote in message
news:bu**********@news.tudelft.nl...
<snip>
- open a child
- let the child replace the current location of the parent, not via
parent.. but via the name you gave the parent.
- then try to close the parent via that name.

I may hope this bug is fixed by now for all browsers.
The browser (MSIE) just though the child became parent of it's parent.


That is a very convoluted way of exploiting the bug that Randy alluded
to, an probably less reliable than the usual[1] method.

Richard.

[1] Not usual in the sense that this is often done as it is a really
*bad* idea to shut down someone else's software without asking them
first, you never know what you might be destroying in the process.
Jul 20 '05 #5
DJ WIce wrote:
: The only windows you can close via scripting are the windows that the
: scripting opens.
:
: you cannot close the original window that the user opens with a
: shortcut... (well you can but the user has the choice as you can see).
In the past you could:

- open a child
- let the child replace the current location of the parent, not via parent..
but via the name you gave the parent.
- then try to close the parent via that name.

I may hope this bug is fixed by now for all browsers.
The browser (MSIE) just though the child became parent of it's parent.


Its not even that difficult. I can close the original page (In certain
browsers), without opening a second window at all.
--
Randy

Jul 20 '05 #6
On Fri, 16 Jan 2004 13:06:22 -0500, Randy Webb
<hi************@aol.com> wrote:

Its not even that difficult. I can close the original page (In certain
browsers), without opening a second window at all.


Yeah, but that's not really being anti-social

screen.bufferDepth=2

now that's anti-social.

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #7
ji*@jibbering.com (Jim Ley) writes:
screen.bufferDepth=2
now that's anti-social.


Damn.

That's horrible.

Somebody should have each bone in their hands broken with
a hammer for specifying that.

(but did you mean 1? msdn seems to say that 2 is equivalent to -1,
and testing on IE6 verifies this)

--
Chris Jeris cj****@oinvzer.net Apply (1 6 2 4)(3 7) to domain to reply.
Jul 20 '05 #8
Jim Ley wrote:
On Fri, 16 Jan 2004 13:06:22 -0500, Randy Webb
<hi************@aol.com> wrote:
Its not even that difficult. I can close the original page (In certain
browsers), without opening a second window at all.

Yeah, but that's not really being anti-social

screen.bufferDepth=2

now that's anti-social.


<g> aint it though?

--
Randy

Jul 20 '05 #9
rf

"Jim Ley" <ji*@jibbering.com> wrote in message
news:40**************@news.cis.dfn.de...
On Fri, 16 Jan 2004 13:06:22 -0500, Randy Webb
<hi************@aol.com> wrote:

Its not even that difficult. I can close the original page (In certain
browsers), without opening a second window at all.


Yeah, but that's not really being anti-social

screen.bufferDepth=2

now that's anti-social.


Stick it in your onUnload. Then the next site gets blamed :-)

Cheers
Richard
Jul 20 '05 #10
On Fri, 16 Jan 2004 18:39:15 GMT, ji*@jibbering.com (Jim Ley) wrote:
On Fri, 16 Jan 2004 13:06:22 -0500, Randy Webb
<hi************@aol.com> wrote:

Its not even that difficult. I can close the original page (In certain
browsers), without opening a second window at all.


Yeah, but that's not really being anti-social

screen.bufferDepth=2


Oops sorry, it looks like 2 isn't supported (no idea why) go for 1
instead.

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #11

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

Similar topics

9
by: Pack Fan | last post by:
I've noticed that session variables will persist on Mac IE even after all browser windows have been closed. One must quit the program to clear the session variables. This presents a security risk...
2
by: Simon Fletcher | last post by:
Hello there, I need a "Close Window" script ( onLoad.Close.Window() ), however i need the script so it don't come up with this annoying window: "This window is trying to close" window. Is...
9
by: Graham | last post by:
What I currently have is a page that opens another browser at 800x600, once that is loaded I would like to close the orginal page down while keeping the page that it has just opened open (To make...
6
by: chon | last post by:
I have an ASP page that is sent a file location as a parameter. It opens this file, loads the ADODB.Stream object and does a binary write to the page forcing the download dialog to appear. This...
3
by: Isabel | last post by:
How can you close all child browser windows that where open by a parent browser window? I have links on a parent (main) page that opens the child page as a separate browser. However, I need to be...
4
by: Ron Lautmann | last post by:
I want to close a browser window so I created a Close button that does this: private void Button1_Click(object sender, System.EventArgs e) {...
7
by: Paul | last post by:
Hi I have a web application that has a log off selection, just redirects the browser to a form with a label displaying you are loging off. In part of the application I open a new window and was...
37
by: Jan Tovgaard | last post by:
Hey everyone:) We have a critical problem, which I can see that other people also has ran into. In Internet Explorer 7 it is no longer possible to do a window.close after opening a window,...
7
by: Toccoa | last post by:
After considerable googling - I mean searching with Google(r) - I could not find javascript on a button or <a href=... to close a window in the latest versions of IE and FireFox. There seemed...
5
by: jimmy | last post by:
Hi all, I want to capture the event when the browser's close button is clicked in an html page. I tried using the event.ClientX and event.ClientY property in the body unload event, and this...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.