469,898 Members | 1,611 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

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 2121
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Simon Fletcher | last post: by
9 posts views Thread by Graham | last post: by
3 posts views Thread by Isabel | last post: by
4 posts views Thread by Ron Lautmann | last post: by
37 posts views Thread by Jan Tovgaard | last post: by
5 posts views Thread by jimmy | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.