Retrieving all JavaScript variables

  • Thread starter Thread starter julekmen
  • Start date Start date
J

julekmen

Hello,

I have a C# project, I use System.Windows.Forms.WebBrowser (mshtml
wrapper) to show a html page. I want to retrieve all Javascript
variables and their values.
Only thing I have found is: http://support.teamdev.com/docs/DOC-1062 -
but here are used some special Java wrappers.
Do you know, how to do it in System.Windows.Forms.WebBrowser?

Thanks!
 
Hi,

I do not know if this is the only way, but here is what I do. I add a
JavaScript function for each variable that I want to return to my
application, and return it explicitly as an event argument (here named
ReturnVarZ in my application code):

function GetVarZ()

{

var z = SomeValue;

window.external.ReturnVarZ( z);

}

I hope this helps.

Dick
--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
Back
Top