1

There is a webpage which has a javascript method in the following format:

window.usePlainText = function() {
    bla bla
}

A button on that same page calls the function using:

onlick = "return usePlainText();"

Here is how I tried to run it, but It did nothing:

WebBrowser.Document.InvokeScript("usePlainText()");

Thanks!

1 Answer 1

3

InvokeScript() takes a function name:

WebBrowser.Document.InvokeScript("usePlainText");
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! On another site it had the "()" too! Guess that's where it got stuck in my head!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.