RSS Forums RSS
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 4343 | Replies: 5
Reply
Join Date: Mar 2006
Location: Alabama
Posts: 3
Reputation: benje677 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
benje677 benje677 is offline Offline
Newbie Poster

Question How to close IE without a user dialog box?

  #1  
Mar 8th, 2006
I have a third party product that I hit a link to from within a .vbs running unattended on a server. Hitting the link starts an update process. When I hit the link, IE opens and the link returns a page that is blank except for the following code.

Code:
<script type="text/javascript" language="JavaScript">
this.window.close();
</script>
End Code:

This causes a dialog box asking if the browser can be closed to be created. Is there a registry setting or some way around this?

Thanks in advance,

Benje
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Posts: 1,592
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 35
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: How to close IE without a user dialog box?

  #2  
Mar 8th, 2006
Sorry, you cannot. This is by design: a script on one page should never be allowed to close a page on another domain wtithout first asking the user. This behavior is built into the browser itself.
Reply With Quote  
Join Date: Mar 2006
Location: Alabama
Posts: 3
Reputation: benje677 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
benje677 benje677 is offline Offline
Newbie Poster

Re: How to close IE without a user dialog box?

  #3  
Mar 9th, 2006
I suspected that was the case. I guess I will have to write a script to run periodically that kills all the IE processes on the server.

Thanks for the response!


Originally Posted by tgreer
Sorry, you cannot. This is by design: a script on one page should never be allowed to close a page on another domain wtithout first asking the user. This behavior is built into the browser itself.
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 108
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: How to close IE without a user dialog box?

  #4  
Mar 9th, 2006
or simply build a program that monitors for the existance of that window (the asking window) and then closes it. Attached is the source code (in VB6) should you want it... and you can download the program itself (setup and all) from here:
http://www.aftermath.net/~coma/daniweb/asknot.zip

enjoy.
Attached Files
File Type: zip asknotsrc.zip (4.1 KB, 13 views)
Reply With Quote  
Join Date: Mar 2006
Location: Alabama
Posts: 3
Reputation: benje677 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
benje677 benje677 is offline Offline
Newbie Poster

Re: How to close IE without a user dialog box?

  #5  
Mar 10th, 2006
Thanks for the response, but our Data Security folks won't allow watchdogs like that to run on a web server without a lot of exception paperwork.

I am taking a look at httpcmd. This is a command line utility from MS that comes on the Server resource kit. This should allow me to hit a site without opening IE.

Thanks again,

Benje



Originally Posted by Comatose
or simply build a program that monitors for the existance of that window (the asking window) and then closes it. Attached is the source code (in VB6) should you want it... and you can download the program itself (setup and all) from here:
http://www.aftermath.net/~coma/daniweb/asknot.zip

enjoy.
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 108
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: How to close IE without a user dialog box?

  #6  
Mar 10th, 2006
Cool. I didn't suspect that they would, but I figured so long as they had source they would be happy..... *shrugs* no biggy.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 1:52 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC