close a window... IE7

a8le

Well-known member
Joined
Oct 27, 2005
Messages
75
Programming Experience
5-10
Hi all,

I have a little piece of code that closes a pop-up after some scripts have run...

VB.NET:
Page.RegisterStartupScript("Close", "<script language=javascript>window.close(); </script>")

Which works fine in IE6, but with IE7... I get a prompt confirming that I want to close it... very annoying. Anyway to get around this? Possible Javascript forum question, thought I ask ya'll first.

Thanks in advance,
a8le.
 
HTML:
<input id="btnClose" type="button" value="close" onclick="javascript:window.open('','_parent',''); window.close();" />
 
didn't work
Strange that it would be difference between two IE7, it works fine here. Could be differences with the OS perhaps?
 
Back
Top