Questions tagged [invokescript]
39 questions
18
votes
1 answer
WebView InvokeScript HRESULT 0x80020101
I'm trying to invoke a function in a WebView. Some target functions I need to call are these:
play: function()
{
if (this.value < this.p.max)
{
this.inc();
this.timer = new it_timer({ object: this, method: "play", timeout:…

SBoss
- 8,845
- 7
- 28
- 44
8
votes
3 answers
How to call a jQuery function from .NET WebBrowser control using InvokeScript()?
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…

GuyWithDogs
- 683
- 1
- 4
- 18
3
votes
3 answers
Why code scheduled via setTimeout method in WebBrowser control is not invoked
using System;
using System.Runtime.InteropServices;
using System.Windows.Forms;
public static class Program
{
[STAThread]
public static void Main()
{
using (var browser = new WebBrowser())
{
…

Vladimir Reshetnikov
- 11,750
- 4
- 30
- 51
3
votes
1 answer
WP8.1 InvokeScript Error
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) =>
{
…

alexandre-tsu-manuel
- 402
- 2
- 11
3
votes
1 answer
WebBrowser Control - Invoke Script Problems with JavaScript Button
I am trying to login to a website. I am able to fill out the form correctly with all of the connection information, but I cannot get the page to login. The button is a link without a name or id, so I can't click it directly. I have been working…

Nathan Tornquist
- 6,468
- 10
- 47
- 72
2
votes
1 answer
How to get any web site alert message UWP WebView
what am I doing wrong?
I used w3schools.com for testing.
webView.Navigate(new Uri("https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_alert"));
Package.appxmanifest file
NavigationCompleted
private async void…

Laurenz St
- 23
- 6
2
votes
1 answer
Invoke a javascript function in WebBrowser and wait until javascript event fires
I'm working in .NET, C# to be specific, creating a Win Forms UserControl, which contains a WebBrowser control. The WebBrowser control hosts a page, which in turn uses a third-party javascript component. The problem I'm having is with invoking a…

Sheldmandu
- 1,700
- 16
- 10
2
votes
1 answer
Return an existing javascript variable from a WebView via InvokeScriptAsync
Ok, this is silly. I have an existing variable in the HTML I load into my WebView, called caret_position
I want to retrieve it via InvokeScriptAsync in my Windows Store app. Here's what I've tried.
return await HtmlEditor.InvokeScriptAsync("eval",…

roryok
- 9,325
- 17
- 71
- 138
2
votes
1 answer
WP8 - Get meta tags info from WebBrowser
I been trying to get the meta tag info from a webbrowser on WP8, but without success.
I tryed:
var myDesc = (string)myBrowser.InvokeScript("eval", " $('meta[name=description]').attr('content');");
and this...
string jsString = "";
jsString += " …

Gabriel Gómez
- 311
- 2
- 10
1
vote
1 answer
Set Data With Document.InvokeScript And JavaScript Code
I embeded TinyMCE codes in webBrowser control and used as an HTML editor. Getting data do not provide error but setting data occurs problem. Here is my codes:
public partial class TinyMCE : UserControl
{
public TinyMCE()
{
…
user1372430
1
vote
0 answers
c# web browser Invoke Script in event handler not working
I am using web browser control and trying to call function in Javascript using document.InvokeScript.
It works everywhere else in my code except at the part where i call event handler for Process.Exited.
//this function is being called from…

Nick
- 455
- 9
- 28
1
vote
1 answer
The InvokeScript() Method returns null
The InvokeScript() Method returns null.
JavaScript:
function gpsToAddress(gpsX, gpsY) {
var coords = new daum.maps.LatLng(gpsX, gpsY);
geocoder.coord2detailaddr(coords, CallbackA)}
function CallbackA(status, result) {
…

Mt.Nine
- 11
- 5
1
vote
1 answer
UWP Visual C# WebView InvokeScript to change CSS throws Exception
I am trying to change the CSS of a loaded Website in a WebView (not local) by injecting a Javascript Function. I found these two Articles (Article 1, Article 2) but after implementing both Versions I always get the following…

David
- 15
- 6
1
vote
2 answers
Invoke Javascript in WPF webbrowser without dispatcher
I have an application implementing the WPF WebBrowser control. It loads a page containing some JS functions that have to be called from my application, possibly from other threads. Preferrably, I would like to stick to the MVVM pattern and keep the…

Bart
- 21
- 2