472,340 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,340 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 2246
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...
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: ...
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...
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...
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...
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...
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...
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...
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 ...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

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.