Questions tagged [invokescript]
39 questions
1
vote
0 answers
WPF Webbrowser invokeScript from separated JavaScript file
With a WPF WebBrowser, I'm trying to use a JavaScript method with the code:
WebBrowser.InvokeScript("eval", new object[] { if(typeof myMethod == 'function') { myMethod('param'); } });
My method :
function myMethod(param) {
alert(param);
}
If I…

Gab
- 1,861
- 5
- 26
- 39
1
vote
1 answer
Error UnathorizedException when invoking JavaScript from C#
I am trying to call JavaScript code from C# in a PhoneGap (Cordova) Windows Phone 8 application. Following the steps of this accepted answer thread: How to call JavaScript from C# - Cordova/PhoneGap
I am supposed to be able to access a method in…

victorO
- 35
- 3
1
vote
1 answer
InvokeScript throws exception the second time through (works first time)
I have been assigned the task of solving a Windows Phone C# problem, but unfortunately I have never done any web development or phone development, so I'm in a bit of trouble. After several hours of beating my head in, I gave up and came here to…

bek
- 11
- 2
1
vote
1 answer
Using jQuery to asynchronously get text value of a DIV element of a .NET Windows Forms WebBrowser control's document
I have the following C# code to get a DIV's html element text value from a .NET Windows Forms WebBrowser control:
private void cmdGetText_Click(object sender, EventArgs e)
{
string codeString = string.Format("$('#testTextBlock').text();");
…

ShamilS
- 1,410
- 2
- 20
- 40
1
vote
1 answer
how to click json hyperlink on page using javascript
Hey on a windows 8 app I want to automatic click on a hyperlink after web page is loaded in the webviewer.. The code for the hyperlink looks like this:
……

Kasper S Mathiesen
- 669
- 1
- 7
- 17
1
vote
1 answer
C# Webbrowser Onclick Javascript event handling
I got this code from HTML:
1
vote
1 answer
C# WebBrowser InvokeScript gives error
I am developing Windows Phone 7.5 PhoneGap app. I needed to call JavaScript function from code behind C#. My MainPage.xaml.cs is follows.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using…
user2189143
1
vote
1 answer
InvokeScript, JavaScript Error
I have an IE9 Web browser control embedded in a larger WPF application. I'm attempting to call InvokeScript and pass it a JSON string as a parameter:
webBrowser.InvokeScript("redrawPlot", new object[] { reDrawData });
The function redrawPlot uses…

Mark
- 106,305
- 20
- 172
- 230
1
vote
1 answer
Adding properties to Javascript object at run time
Let's say I have this function in javascript
function EstablishUserSession(params) {
gecResult = "noResult";
params["callbackOnSuccess"] = Success;
params["callbackOnException"] = Exception;
…

Dave Lawrence
- 3,843
- 2
- 21
- 35
1
vote
1 answer
C# Webbrowser.invokeScript and Error: 80020006 only in this particular site
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…

Onni Hakala
- 563
- 4
- 18
0
votes
1 answer
C# webBrowser InvokeScript namespace specification
I am writing a c# program, which is used for generating an HTML file and calls a JavaScript function when a button is clicked in the WPF project. However, when I use the function, it throws an error.
Error message:
A using namespace directive can…

ahSa
- 19
- 2
0
votes
2 answers
WP7 Webbrowser InvokeScript errors
WebBrowser control's invoke script is always giving me errors. This html script is validated from http://validator.w3.org. I wrote the code such that on clicking "button1" webBrowser1 invokes the function "setCredentials". I am not sure why this is…

Prakash
- 823
- 12
- 28
0
votes
3 answers
How do I invoke a Javascript that does not have a name using C#
I would like to invoke a Javascript function on a web page that does not have a function name. Using C#, I would normally use Webbrowser.Document.InvokeScript("ScriptName"). In this instance however, there is only a type attribute. This is what it…

Paul
- 177
- 1
- 5
- 14
0
votes
1 answer
How to call Angular2 Function from C# code
Hi I want to invoke a method in my angular app from C# code. My angular app resides inside WPF WebBrowser control. Below are the code snippets from C# & Angular.
C# Code snippet:
[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
…

RDV
- 957
- 13
- 28
0
votes
2 answers
Python 2.X on NiFi: problems with Ñ (and others) in json.loads
I'm using a Jython InvokeScriptedProcessor to struct data from json struct to sql struct. I'm having trouble with a specific function. json.loads. json.loads does not recognize special characters like ñ, é, á, í...
It writes it in an odd form. And…

Krakenudo
- 182
- 1
- 17