Disable message "do you want to close this window" in IE7

G

Guest

I have an observation about IE7, I need to disable a message "do you want to
close this window?" generates by the browser.

Is there a way for disable this message ?.

Here I send us a html sample:

<html>
<head>
<script language="JavaScript">
function StartPage()
{
window.open( 'http://www.yahoo.com' , '' , '' ) ;
this.focus();
self.opener = this;
self.close();
}
</script>
</head>
<body onload='StartPage()'>
Testing Self.close()
</body>
</html>
 
D

Douglas J Steele

I'd suggest asking this in a newsgroup related to Internet Explorer.

This newsgroup is for questions about Access, the database product that's
part of Office Professional.
 
Joined
Nov 3, 2006
Messages
2
Reaction score
0
I need a workaround for this too

I have my own application which run window.close to my own application.
I really need an workaround for this.
 
Joined
Nov 3, 2006
Messages
2
Reaction score
0
script to close browser without confirmation in IE7

I got it after few hours brainstorming and testing.

Since IE7 doesn't allow to close non-script-initialized browser to be closed by script, just has to initialize a new broser by targeting to '_self' and close it immediately.

Here is the code, cheer~~~
window.open('','_self');window.close()
 
Joined
Jan 25, 2009
Messages
1
Reaction score
0
Gexzhell said:
I got it after few hours brainstorming and testing.

Since IE7 doesn't allow to close non-script-initialized browser to be closed by script, just has to initialize a new broser by targeting to '_self' and close it immediately.

Here is the code, cheer~~~
window.open('','_self');window.close()


My friend I have scoured the internet for this very simple function. And I sir thank you deeply for sharing it. It works Perfectly.8)
 

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

Top