473,698 Members | 2,153 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

self.close

I am using the following code to close a parent window.

setTimeout('sel f.close()',1000 );

Is it posible to remove the confirm dialog?

Thanks Clive
--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Jul 20 '05 #1
2 13447
Clive Moore wrote:
I am using the following code to close a parent window.

setTimeout('sel f.close()',1000 );

Is it posible to remove the confirm dialog?

Thanks Clive


Hi Clive,

I think it works like this (correct me if I am wrong)

The confirm dialog is there when javascript from windowA tries to close
windowB, AND windowB was not created by Javascript.
This is build like this to prevent that a certain window can close all you
other windows without your permission.

So if you want WindowA to have the possibility to close WindowB, you should
let windowB be created by windowA (with window.open().)

Good Luck,

Regards,
Erwin Moller

Jul 20 '05 #2
In article <db************ *************** *********@mygat e.mailgate.org> , "Clive
Moore" <he********@hot mail.com> writes:
I am using the following code to close a parent window.

setTimeout('se lf.close()',100 0);

Is it posible to remove the confirm dialog?

Thanks Clive


window.opener = window;
window.close();

exploits what some consider to be a bug in browsers.
--
Randy
Jul 20 '05 #3

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

Similar topics

2
4709
by: Marc | last post by:
Hi all, I was using Tkinter.IntVar() to store values from a large list of parts that I pulled from a list. This is the code to initialize the instances: def initVariables(self): self.e = IntVar() for part, list in info.masterList.items():
14
1970
by: bruce stockwell | last post by:
Using 'self' in classes seems pretty straight forward. My curiosity is why I have to use it. Shouldn't it be implied? If I create an instance of 'human' called 'bruce' and call the method 'blink' why do I have to pass bruce into the method e.g. class human: ...code def blink(self,times): for i in range(times): if self.eye_is_closed:
1
7898
by: Walter Beierdonck | last post by:
Hi, I've written a script dat has to run with a windows-shortcut... ex: http://www.domein.com/script.php This is my script: <html> <head> <script> var howLong = 2000;
4
2006
by: Raymond Wilk | last post by:
I used javascript to open a new window, then used the following to close the new window on the next click: <body onBlur="self.close()" onClick="self.close()" bgcolor="#FFFFFF"> On the new window I want to place a link to another website, and I want the new window to open the link in ANOTHER new window (not the parent window) and then self close. The idea is that on the first new window I have a picture, and a link to another website...
1
3577
by: Steven | last post by:
I have a webpage where the user enters parameters for a report. This page then post to a 2nd page. In this second page is the code to create the report. The output of the page when it is complete should open the report(in excel or snapshot) and then close the page. >From the prompt page the post looks like this: <FORM NAME='frmReportpr' method=POST action=\aspobjects\ReportPreview.asp target='_blank'>
4
14466
by: stevong | last post by:
It works on Konquerer though. I remember it works on IE too. I've tried window.close() too. Doesn't work on Firefox also. I've also tried to create a function. It doesnt work on Firefox also. Bottomline is: Firefox doesn't accept window.close() or self.close()? Are there ways to rectify the issue? Please advise.
1
2595
by: oliver gargour | last post by:
Hello, I am using the following code in a popup. <html> <head> <title></title> </head> <body onLoad="this.focus();" onblur="self.close"> <form action="" method="get">
1
2765
by: liu | last post by:
I have some thumbnails and once clicked it creates a new window. I don't want extra windows everywhere so I'd like it to auto-close when it's in the background. I've found <body onBlur="self.close()" onClick="self.close()"to do the trick, but some windows are longer than 1 page that a user need to scroll the window to see it. With the script above, it closes even when clicked. I took onClick="self.close()" out but it still does the same...
1
4505
by: michal.podlewski | last post by:
Hi All, I have a problem with a simple (as I thought till now) thing: I want to make a link in a child-window which would change site in the parent-window and along with closing child window. The parent window name is "main". A made a link like this in the child-site: <a href="new_address.html" target="main" class="about" onclick="javascript:main.location='new_address.html';self.close();"> change and close </a>
0
9155
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
9018
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
8890
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
7711
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...
0
4360
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
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3038
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
2
2322
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1997
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.