0

How can I call either a function within a html document and get back its return value? The same idea applies for getting a defined variable's value.

An example of me getting a defined variable's value would be:

navigator.userAgent


And when I call a function and get its return value, I mean something like this:

document.getElementsByTagName("input")


So in the end run, my question is, how can this be done using the WebBrowser control?

I really do appreciate any help and if you know of more than one way to perform these actions, please do suggest all of your answers. Thank you any support you have available.

Jake
  • 181
  • 2
  • 15
  • 1
    There's a number of options to do this: http://stackoverflow.com/a/19002650/1768303 – noseratio Mar 31 '14 at 05:10
  • I understand the example answer that you have provided me with, but I am looking to be able to get the return value to either a calling of a function or of a variable within the document. – Jake Apr 02 '14 at 16:33
  • Did you not notice this example, which returns a value? `var result = (bool)htmlWindow.eval("(function() { return confirm('Continue?'); })()");` – noseratio Apr 02 '14 at 23:05

0 Answers0