0

I have a problem with an embedded javascript link, the site is not mine and the java script is the website's own. I've read some questions on this website and they didn't solve my problem because the javascript is not a written text, it's an embedded link like some other sites'. The internet explorer runs well with all sites.

Has someone a good idea with source code, please help?

   private void Form1_Load(object sender, EventArgs e)
    {
        webBrowser1.DocumentText = @"<html><head>
            <script type='text/javascript'>
                function doIt() {
                    alert('hello again');
                    return 'i did it!';
                }
            </script>
            </head><body>hello!</body></html>";



        webBrowser1.Navigate("https://pro.beatport.com/");
       // A script error appears, but I want to run it.:
       // https://pro.beatport.com/static/1c1446445b81130df058c152e3dff01e30e2903d/js/main.js

    }
SK94
  • 1
  • 5

1 Answers1

0

This way:

webBrowser1.ScriptErrorsSuppressed = true;
Graffito
  • 1,658
  • 1
  • 11
  • 10
  • I know this and I don't want to skip, I want to run it well. – SK94 Jul 31 '15 at 17:56
  • An alternative will be to use another WebBrowser [awesomium](http://www.awesomium.com/) – Graffito Jul 31 '15 at 18:00
  • Do you know a simplier solution in c# without external plugins? :) – SK94 Jul 31 '15 at 18:15
  • Perhaps by changing the user agent . Refer to [this discussion](http://stackoverflow.com/questions/5531452/webbrowser-control-to-use-ie9) – Graffito Jul 31 '15 at 18:22
  • I tried it but the browser checker shows me IE7 but I installed IE11 on win 7 64bit. I can't see "contoso.exe" in the browser emulation. I overwrote the exe files to 2AF9 value an in my webbrowser control appears as IE 7. – SK94 Jul 31 '15 at 19:03