View Single Post
Posts: 237 | Thanked: 193 times | Joined on Feb 2010 @ Brighton, UK
#3
Originally Posted by Lullen View Post
But the bigger problem I have is that when I get the response with the script and runs it, it should try to communicate with the server. This is becuase in the <script type="text/javascript"> there is a function filter which looks like this:

Code:
function filter() {
var query = "userId=11111&daysBack=" + $("#daysBack").val();
$("#chartContainer").load("/statistics/typedistributionchart?" + query);
}
I have been running wireshark to see all the packets thats being transmitted/recieved. But all I see is a ACK and then nothing more. So what I think is that this $("#chartContainer").load() stuff is already on my computer. But if so how do I access this and what datatype is it??

Yours,
Looks like fairly standard JavaScript JQuery running in a browser :
var query
is a dynamically built string where
$("#daysBack").val()
is most likely the value inputted or held in the html form element with 'id="daysBack"'

$("#chartContainer").load("/statistics/typedistributionchart?" + query);
is then calling the url query and displaying the returned HTML in a visual element with an 'id=chartContainer'

If I were you I'd look at what:
http://THE_SITE/statistics/typedistr...111&daysBack=2
returns, assuming a valid user ID of course.

Does it return HTML? Will you need to parse out the bits you want from this markup? Does the site offer a cleaner way of getting this data?
 

The Following User Says Thank You to mr id For This Useful Post: