469,338 Members | 7,993 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

No confirmation window.close in IE7

Is there a better way than this in IE7 for an Intranet page on a
trusted site to close a non-script opened window?

var WshShell = new ActiveXObject("WScript.Shell");
WshShell.SendKeys("{ENTER}");
window.close();

Based on this:
http://www.codeproject.com/useritems...__new_try_.asp

Is there any kind of registry change that we can roll out on our LAN
that will allow window's to close themselves in Javascript for IE7?

Nov 9 '06 #1
2 12060
Matthew Lock said the following on 11/9/2006 2:43 AM:
Is there a better way than this in IE7 for an Intranet page on a
trusted site to close a non-script opened window?

var WshShell = new ActiveXObject("WScript.Shell");
WshShell.SendKeys("{ENTER}");
window.close();

Based on this:
http://www.codeproject.com/useritems...__new_try_.asp

Is there any kind of registry change that we can roll out on our LAN
that will allow window's to close themselves in Javascript for IE7?
<script type="text/javascript">
window.open('','_parent','');
window.close();
</script>

Until MS gets around to fixing it, will close IE7 without a prompt.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 9 '06 #2

Randy Webb wrote:
<script type="text/javascript">
window.open('','_parent','');
window.close();
</script>

Until MS gets around to fixing it, will close IE7 without a prompt.
Thanks.

It's a pity there's no way to enable non-script opened windows to be
closed by scripts in the security settings. It would be handy for
intranets.

Nov 10 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by kelvin | last post: by
9 posts views Thread by ScooterMX | last post: by
2 posts views Thread by James Doughty | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.