Results 1 to 4 of 4
Thread: IE7 security woes
Aug 9, 2007, 21:45 #1
- Join Date
- Mar 2005
- Madison, WI
- 0 Post(s)
- 0 Thread(s)
IE7 security woes
In one of my desktop apps, I am generating an HTML file, and then opening it in Explorer and immediately firing off a window.print() command, to allow my users to print the generated document. I also fire a window.close() command in the onafterprint event handler, so that the generated document will close itself as soon as it's done with the print dialog, thereby saving my users the extra click to close it (trying to, anyway...). I've run into two separate snags, though:
#1) The gold bar appears on top in IE7, saying: To help protect your security, Internet Explorer has restricted this webpage from running scripts or ActiveX controls that could access your computer.
The only reason I'm opening Explorer is to take advantage of its rendering engine to display and print the simple HTML I generated, so IE is not my main focus here, it's the desktop app that generates the HTML and calls IE that's really in charge.
#2) IE7 no longer lets the last remaining window close itself--not without being met with this prompt, anyway: The webpage you are vieiwing is trying to close the window. Do you want to close this window? In previous versions, this could be accomplished by setting window.opener to something non-empty, and then closing the window. IE7 now prevents this. So... has anyone found a workaround to this yet? Any way to close the window without the annoying prompt?
My only other alternative is to use some sort of HTML printing utility, such as HTMLPrint--except I have yet to find anything with any sort of reasonable price for use with a commercial application. So I figured I'd just use something that all my users already have: IE. Except it's not the ideal solution with all the extra clicking involved. I could just tell them to hit "File - Print" manually and skip the JS altogether, but that too isn't very ideal.// useless crap about my relationships, philosophy,
// theology, music and programming projects:
my $blog = 'http://gordon-myers.com/';