2

I am invoking javascript from code behind in windows mobile application. I am using Windows Phone SDK 8.0 and Visual Studio 2012 for development.

I am getting following isuue when invoking

wbInnerContent.InvokeScript('scriptName', new String[] { jsonval });

{System.SystemException: An unknown error has occurred. Error: 80020101. at Microsoft.Phone.Controls.NativeMethods.ValidateHResult(Int32 hr) at Microsoft.Phone.Controls.WebBrowserInterop.InvokeScript(String scriptName, String[] args) at Microsoft.Phone.Controls.WebBrowser.InvokeScript(String scriptName, String[] args) at OneVoiceAfrica.Header.d__16.MoveNext()}

I am new to mobile application development. kindly help me to fix this issue.

Thanks in advance.

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Siva
  • 102
  • 9

1 Answers1

0

Make sure that IsScriptingEnabled is true and maybe the issue could be due to Loaded event is called too early.

  webBrowser.IsScriptEnabled = true;

WP7 InvokeScript error

Reference

Community
  • 1
  • 1
Kulasangar
  • 9,046
  • 5
  • 51
  • 82