JavaScript Variable visibility from C#

May I ask for your help?

The C-Sharp environment is still new for me and the learning curve has been steep.In any event, I am attempting to obtain visibility ofJS variablesfrom javascript calls sent to a web-site's server from within it's HTML. I have attempted to obtain this visibility through the different flavors of the IHTMLDocument ( , 2, 3, 4 and 5) interfaces, with references to "microsoft.mshtml" and "Interop.SHDocVw", and although I can see all of the variables of the HTML, I don't seem to have the visibility of the JavaScript calls variables.

Is the use of IHTMLDocument (and it's different iterations) the right direction? If so, which IHTMLDocument iteration should I be using ( , 2, 3, 4, 5)? It appears that IHTMLDocument2 and IHTMLDocument3 provide the greatest visibility to a website's HTML information, however it doesn't seem to provide any access to the underlying JavaScript calls.

Is there possibly a better way to gather this information?

Thanks in advance,

Bill Hunter

[1797 byte] By [whunter31] at [2007-12-25]
# 1

Hi Bill,

Javsascript variables are not sent to the server. They are very distinct environments.

However if you do wish to transmit some limited information to a web page you can use form field values in the HTML - setting them from javascvript - and retrieve on the the server via the page elements.

rgds,

Martin.

mokeefe at 2007-10-8 > top of Msdn Tech,.NET Development,JScript for the .NET Framework...
# 2

Martin, thank you so much for your fast reply.

Unfortunately I don't believe my question was very clear and possibly I could clarify. I am attempting to obtain visibility to variables that are gathered from the server through javascript calls from within the client-side HTML. I have attempted to obtain visibility through C# and although I can see the 'surface' HTML variables, I have been unable to see the underlying javscript variables that are gathered by the HTML javascript calls. To date, I have been attempting (unsuccessfully) to gain visibility through the different flavors of the IHTMLDocument ( , 2, 3, 4 and 5) interfaces.

Any suggestions?

Bill

whunter31 at 2007-10-8 > top of Msdn Tech,.NET Development,JScript for the .NET Framework...

.NET Development

Site Classified