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

Self.close() window without the dialog close?Yes/NO

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;
t = null;
function closeMe(){
t = setTimeout("self.close()",howLong);
}
</script>
</head>

<BODY ONLOAD='window.closeMe()'>
<h1>hello this box has to appaer for 2 seconds and has to close without a
dialog box</h1>
</body>
</html>

the problem is that after 2sec. a dialog box appear on my screen ask for
closing this window

Can some one help me so this dialog-box doesn't appear en the window just
close

thx,


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.669 / Virus Database: 431 - Release Date: 26/04/2004
Jul 23 '05 #1
1 7875
Walter Beierdonck wrote:
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;
t = null;
function closeMe(){
t = setTimeout("self.close()",howLong);
}
</script>
</head>

<BODY ONLOAD='window.closeMe()'>
<h1>hello this box has to appaer for 2 seconds and has to close without a
dialog box</h1>
</body>
</html>

the problem is that after 2sec. a dialog box appear on my screen ask for
closing this window

Can some one help me so this dialog-box doesn't appear en the window just
close


No. There is no way to reliably close a window you did not open with script, or
that has history without the browser either a) not honoring the request
silently or b) prompting you.

--
| Grant Wagner <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 23 '05 #2

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

Similar topics

3
by: Jonan | last post by:
Hi, I use JavaScript I have tree windows. Jonan1.html has this code erref1=window.open("Jonan2.html", "mypage",null); This opens Jonan2.html and it has this code...
2
by: Clive Moore | last post by:
I am using the following code to close a parent window. setTimeout('self.close()',1000); Is it posible to remove the confirm dialog? Thanks Clive --
2
by: Matt | last post by:
When the user click the "Close Application" button, it will close the window. That window is not called by window.open(...) before. However, when it calls window.close(), it pops up an dialog...
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...
4
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...
7
by: mg | last post by:
I need to first open WebForm2 from WebForm1 and then close WebForm1 without the end user having to press an OK button before the close can occur. For example, possibly ...
4
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....
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...
1
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...

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.