No confirmation window.close in IE7

M

Matthew Lock

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/Immediate_Close__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?
 
R

Randy Webb

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/Immediate_Close__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.
 
M

Matthew Lock

Randy said:
<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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top