0

I have a Webbrowser control on a form (in VB.net) and am navigating to a site

WebBrowser1.Navigate("https://www.offerpop.com")

and it gives me a javascript error, yet if I go to it directly in a browser (IE 10 or otherwise) it loads fine.

It only happens with https

WebBrowser1.Navigate("http://www.offerpop.com")

works fine.

I think it's something to do with the way the relative path and proxy independent way the source is specified

<script type="text/javascript" src="js/lead_tracking.js"></script>

but don't know how to get around it.

Any ideas.

Wild138
  • 553
  • 3
  • 8

1 Answers1

0

If not specified, webbrowser control would run in IE7 compatible mode on IE 9 core.. i think. Not sure which version it would be if you have IE 10. You can use Meta tag on the page to control it. Check the following thread, it's c# but basically the same thing. Will the IE9 WebBrowser Control Support all of IE9's features, including SVG?

Community
  • 1
  • 1
user1600124
  • 440
  • 2
  • 11
  • Thanks, that's got me partly to a solution, I've added 9000 to the key [HKLM\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION] and the filename of my compiled executable but it still doesn't work with Visual Studio express whilst debugging. – Wild138 Sep 07 '13 at 01:56
  • Got it working in the IDE too now, just needed to add a value for WindowsApplication3.vshost.exe too . Thanks – Wild138 Sep 07 '13 at 02:10
  • Here's [some code](http://stackoverflow.com/questions/18333459/c-sharp-webbrowser-ajax-call/18333982#18333982) to make it happen automatically. `HKEY_CURRENT_USER` works too and doesn't require admin rights. – noseratio Sep 07 '13 at 05:42