Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I'm trying to close the browser usi

Status
Not open for further replies.

TechnicalAnalysis

Programmer
Jul 2, 2001
169
0
0
US
I'm trying to close the browser using
window.close();

I'm getting the confirmation message box for the user to confirm closing the browser.

Is there a way to close the window without the confirmation??
I know that if the window has only one document (the current one) in its session history, the close is allowed without any confirmation is required.
So Can I use JavaScript to clear session history?

Regards


 
if it's the main window you just can't prevent that SECURITY message appearing. Perform a search in this forum, you're not the first one to ask - and no, there's no way to prevent it (would you like YOUR security to be that bad that any remote server can close windows on YOUR machine ? i definitly woudn't !)
 
what about activeX?
*IE only*
<OBJECT id=closes type=&quot;application/x-oleobject&quot; classid=&quot;clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11&quot;>
<param name=&quot;Command&quot; value=&quot;Close&quot;>
</object>
<input type=&quot;button&quot; value=&quot;close window&quot; onclick=&quot;closes.Click();&quot;>

this example was posted here zounds of times (may be here & in html & not zounds, but at least 5 times..)

but iza, don't worry, it won't close your nn4.7 (dinosaur!)
& we always can prevent aX from executing in our ie's turning them off in options (for ie6: tools->internet options->security->cistom level->disable whatever you want to be disabled :)
 
and i'd suggest to disable it as soon as you install ie n your machine .... ;]]]

iza-the-last-dinosaur-on-earth
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top