473,699 Members | 2,768 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2424
On Fri, 16 Jan 2004 13:13:25 +0100, "olga p." <ol********@wan adoo.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********@wan adoo.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*********@dj wice.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.bufferDe pth=2

now that's anti-social.

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

Jul 20 '05 #7
ji*@jibbering.c om (Jim Ley) writes:
screen.bufferDe pth=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.bufferDe pth=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.bufferDe pth=2

now that's anti-social.


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

Cheers
Richard
Jul 20 '05 #10

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

Similar topics

9
3641
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 for my session variable based security scheme. Basically, the risk is that a user will login to my site, close the window when done and allow someone else to come up to the machine, go back to my site and be logged into the previous user's...
2
9315
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 there a script to stop this happening and close the window anyway? Simon Fletcher
9
3234
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 it more clear take a look at http://www.ithorizon.co.uk). I have inserted some code below to show what I currently have, but I don't have the knowledge to amend it, can somone please help. <SCRIPT LANGUAGE="JavaScript">
6
8532
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 all works fine. If the user selects "Open" or "Cancel", the window closes, which is the desired behavior. If they select "Save", the location dialog shows up, they save the file and the window remains open. I've tried a number of things to get...
3
3748
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 able to close all the opened child browser pages from the parent page. Thank you for your help, Isabel
4
6320
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) { RegisterClientScriptBlock("GetData","<Script>close()</Script>"); } But when this runs the browser puts up a dialog box saying: "The web page you are viewing is trying to close the window, od you want to close this window?"
7
3043
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 wondering if there is a way to close all windows associated with the web application when the user selects the log off selection? Thanks. -- Paul G Software engineer.
37
6332
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, without getting a alert message that ask if u want to close the window. This did NOT happen in Internet Explorer 6, Mozilla firefox or other browsers.
7
5823
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 to be two techniques for earlier versions. But the window.opener='' ;window.close(); and the window.open('','_parent','') ;window.close(); techniques do not work for me. I.e., I still get confirmation message
5
34363
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 helps to recognise whether the close button is clicked( also differentiates whethet refresh was clicked). The problem arises whenever i try to close the window by resizing it or by right clicking at the bottom of the page and then closing it. Can...
0
9173
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9033
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8911
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8882
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7748
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6533
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4375
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4627
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2009
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.