invokescript

WP8.1 InvokeScript Error

孤街醉人 提交于 2019-12-23 19:13:15
问题 I am working on a Windows Phone 8.1 App. I have a problem with the InvokeScript method of the WebBrowser class. I have this in my XAML: And when I run this code: myWebBrowser.Loaded += (object sender, RoutedEventArgs e) => { webBrowser.IsScriptEnabled = true; webBrowser.InvokeScript("eval", "alert('foo')"); }; I get a System.SystemException on the line with InvokeScript that tells me this: An unknown error has occurred. Error: 80020006. When I run the same code for Windows Phone 8 (not 8.1) I

How to call a jQuery function from .NET WebBrowser control using InvokeScript()?

删除回忆录丶 提交于 2019-12-18 05:55:45
问题 Had a Windows Forms app using a WebBrowser control (.NET 4) to load a web page that communicated with the app. I had a call to InvokeScript() to call a Javascript routine in the web page at one point. Now things have been "updated", and jQuery is now being used. So instead of having a OnVenueSelected() function to call, it's now some $.city.venue.onVenueSelected: function(param) oddity. Simply changing my call from InvokeScript("OnVenueSelected", new object[] { params }) to InvokeScript("$

How to call a jQuery function from .NET WebBrowser control using InvokeScript()?

我们两清 提交于 2019-12-18 05:55:07
问题 Had a Windows Forms app using a WebBrowser control (.NET 4) to load a web page that communicated with the app. I had a call to InvokeScript() to call a Javascript routine in the web page at one point. Now things have been "updated", and jQuery is now being used. So instead of having a OnVenueSelected() function to call, it's now some $.city.venue.onVenueSelected: function(param) oddity. Simply changing my call from InvokeScript("OnVenueSelected", new object[] { params }) to InvokeScript("$

C# Webbrowser.invokeScript and Error: 80020006 only in this particular site

天涯浪子 提交于 2019-12-13 00:36:40
问题 I have tried to goole solutions for hours... I'm doing an app for windowsphone, which is used to show public transport details. I need to change values of WhereFrom and WhereTo and click submit in the tinyurl webpage and then scrape the info. If you can recommend any other way to do this, please tell it. I have also tried webclient, httpwebrequest, but their instructions and examples are way too complicated for me. I'm stuck with the error mentioned before and the selain.InvokeScript("eval");

How to call a jQuery function from .NET WebBrowser control using InvokeScript()?

醉酒当歌 提交于 2019-11-29 10:19:21
Had a Windows Forms app using a WebBrowser control (.NET 4) to load a web page that communicated with the app. I had a call to InvokeScript() to call a Javascript routine in the web page at one point. Now things have been "updated", and jQuery is now being used. So instead of having a OnVenueSelected() function to call, it's now some $.city.venue.onVenueSelected: function(param) oddity. Simply changing my call from InvokeScript("OnVenueSelected", new object[] { params }) to InvokeScript("$.city.venue.onVenueSelected", new object[] { params }) did not work. I don't get any observable errors or