Search code examples
windows-phone-7.1

How to enable Javascript - webbrowser for windows phone 7.1


I am creating a windows 7.1 phone app where I am using webbrowser to display some web content. I want to know how to enable JavaScript in the browser object in my app? I have set the IsScriptEnabled property to true but that does not seem to help.

Any ideas? Thanks in advance.


Solution

  • Following the MSDN WebBrowser.IsScriptEnabled help you have to refresh WebBrowser content after enabling scripts to make it really happen:

    WebBrowser.IsScriptEnabled Property Enables or disables scripting. This applies to the next document that is navigated to, not the current document. This property is false by default. Set this property to true to enable scripting, or false to disable scripting.