Solved

c# HTTPWebRequest or HTTPRequest javascript problem

Posted on 2008-10-30
1
1,020 Views
Last Modified: 2013-12-17
I am looking for a method in C# that allows me to read client side java script variables<b>or</b>
I cannot seam to get the values for client side javascript variables within a HTTPWebRequest
Suggestions that don't include using a client side browser such as WatiN or incisif.net
Thanks :)

Javascript notes:
When i look at the source code for different types of output on the same secure page.
The source code is identical. I cannot just parse the source code to determine what the javascript is trying to display. Clearly the web server is sending variables to the client some how. Is there a way to show all variables sent to the client via HTTPWebRequest?


Current situation:
The method also must be able to run in the background or scheduled.
C#/WatiN freezes or hangs when a Dialogue pops up for login/password while being run from a scheduled task.
Pumping client side javascript through a browser is not an option apparently.


0
Comment
Question by:darkxer878
1 Comment
 

Accepted Solution

by:
darkxer878 earned 0 total points
ID: 22842425
I have noticed that the javascript code has the following code.

var status = { url:"/status/data.html", req:0, t:0, cb:getData};

I'm guessing this is where the value for the variable is located, but when visiting that link i get the following error.




The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

The following tags were not closed: table, table. Error processing resource
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question