IE blocks Javascript from running
new to these forums, as best i could tell this is the place to post this issue i am having
my application is using the WebBrowser control in VB.Net to display a local HTM file - this file uses Javascript to create the ToC (its an HTML Help file created with MadCap for our application)
the issue is this: on Vista machines, Javascript is being "blocked" by IE, thus the ToC is never built and thus nothing is displayed within the WebBrowser control. we have gone through security settings within IE (i believe it is an issue in both IE7 and IE8, but cannot confirm) and nothing we changed there made any difference.
no error is thrown, it loads the HTM file. but the javascript is blocked and thus the actual contents are never loaded.
when we use IE7 to navigate to that file it does not display properly either; i used Firefox (i have the NoScript add-on) and when i allowed the script to run, it displayed fine.
does anyone know which IE settings will allow a local HTM file to execute Javascript? the WebBrowser control does not have any security settings that i could find.
side note: also an issue with VB6 that uses the IEFrame.dll - which makes sense, because its basically just using the client's version of IE.
thanks, and sorry if this the wrong forum for this.
Re: IE blocks Javascript from running
Welcome! I'd say you mainly have a Javascript problem here; to my understanding, the WebBrowser control is just an instance of the most recent IE browser available on the computer.
When you open the file in the browser (not the control window), do you get any warning message from IE? When I try to run a script, I get the yellow bar at the top of the window with "To protect security, IE has restricted.. blah blah... click here for options." At which point I can click to "allow block content" and then it works fine.
To get the warning to go away, I went to (in IE8) Tools > Internet Options > Advanced tab > Security section > check "Allow active content to run in files on My Computer."
If that doesn't do it, perhaps your Javascript is using a method supported by Firefox and not by IE?...
Re: IE blocks Javascript from running
thanks for the reply - yea, this is really IE / javascript issue, not a VB issue
no message from IE about blocked content (i verified our test machine is using IE7)
on our test machine we were able to get content to eventually load thru the Tools > Internet Options > Advanced tab > Security section > check "Allow active content to run in files on My Computer." - the problem with this is each of our end user's would be required to modify this security settings within their current version of IE, which a non-starter for us.
also i have tried using the Mark of the Web to no avail on our test Vista system.
i just found out this evening that we have other options aside from HTML with javascript for our help system so i am going to recommend that to our staff.
thanks for the feedback Samba!
Re: IE blocks Javascript from running
You probably want the standard (not the "safe for scripting") version of the DHTMLEdit control, which can be used in browse mode. This should allow any scripts to run that need to.
Why the heck aren't you just using standard HTML Help (CHM) format?
Re: IE blocks Javascript from running
Quote:
Originally Posted by
dilettante
You probably want the standard (not the "safe for scripting") version of the DHTMLEdit control, which can be used in browse mode. This should allow any scripts to run that need to.
Why the heck aren't you just using standard HTML Help (CHM) format?
its out of my hands - i just gotta solve the problems that others create!
thanks for the heads up on the DHTMLEdit control, gonna give it a try