By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,238 Members | 1,659 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,238 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.