2
votes

I have a VB6 application using the WebBrowser control. It displays HTML pages from a local folder (using file:// URI scheme). Some of those pages contain embedded JavaScript code.

It all works well for the vast majority of users, but occasionally we get reports from people who have problems with everything JavaScript-related in the pages. Basically, it looks like they have scripting disabled inside the WebBrowser control.

The problem is: I cannot even reproduce the problem. I was trying to fiddle with various settings in IE security (IE8 on Win XP Pro SP3), disabling various scripting-related options for different zones (which zone includes local file system, by the way?), - I'm always having JavaScript running well in my tests.

Does anybody have any idea of what may be going wrong?

Thanks

1

1 Answers

2
votes

I think I know why this is happening, it's because the IE version the WebBrowser control renders under is IE 7.0 in most, and if they are using a browser older than IE 7, it will render under IE 4.0 (seriously). They do this for backwards compatibility. So if some of your users have IE 6, their default IE rendering engine will be IE 4.0. Of course, since you are probably using IE 9, yors would be IE 7 engine.

You can change the engine, if this is what you want to do, to the current engine (ie: to the current version of internet explorer installed on the users system).

Also, I'd like you to go to http://whatsmyuseragent.com/ on your IE browser, and then through the hosted WebBrowser control; you'll see the difference.

Also, ask your problemed users to go to http://whatsmyuseragent.com/ through their hosted WebBrowser control if they can, and note the results, if they are running pre-IE-7 then most likely their hosted webbrowser control will show IE 4.0. This is almost certainly the reason for your problem.