ajax url with dynamically generated page - ajax

i want to get seat value called from ajax.
when i see chrome developer tools i can see seat value
what i want which generated by ajax call but when i see source page i couldn't see.
how i can get seat value data using Httpwebrequest or similar other method not webbrowser ?
is it possible find ajax call url and use this url with httpwebrequest to get seat value?
any tip much appreciate
i tested with Post url in source but no luck

On the network tab of the chrome developer tools, you can see all ajax network calls.
Edit:
Open the network tab then reload the page

Related

Why URL Data does not shows for GET method in ajax?

As we know, GET method sends data via URL. We can use both GET and POST method in ajax. My question is, why can't we see the data in URL when we use ajax with a GET method?
AJAX call is not visible through url.
Try to use firebug extension of firefox.
In firebug, you will find all request in console.
When you fire off your ajax request like this:
The Chrome network tab will show new line for this transaction:
If you click on it, it will show you all the details:
If you'd like more information on constructing your own querystrings, look at this other question: How to build query string with Javascript

Firebug: Inspect POST from webpage

Can I use Firebug to inspect a post request sent by a webpage to a server and if so how?
I am refering inspecting a regular POST made using a form, but would also be interested in knowing how to inspect posts using javascript.
Thanks
Of course you can do that. The Net panel allows you to expand every request related to a website. For a POST done via AJAX you can set the XHR filter to see only those requests.
If you expand a request by clicking on it, you'll get all the information related to it.
Sebastian

How does Firebug get the source code of a page which has a ajax call and is that file saved somewhere?

I have been trying to scrape information from a site where the relevant information is continuously updated using Ajax calls . Inspite of repeated attempts, I haven't been able to determine the link from which the ajax calls are receiving data . So , I decided to change track and use firebug to get the data since it is showing me the data got from the Ajax call. So, does Firebug save the page source anywhere and can we access that by any chance?
This is the link and I am trying to get the song + movie name from the bottom of the page which is updated using Ajax calls. I have tried going through the firebug source code to determine the save but that has also not yielded any result.
Actually I did find the solution to my problem . Looking under Net tab in firebug, I was able to find out the ajax call that was editing the particular site. Using the response I finally managed to use urllib and urllib2 to get the required data :).
As for how firebug gets the source code , there were a few links that I read which said that Firebug gets the exact source code at that instant because it is a browser extension and so has more access to the browser variables and the server response. But not sure how correct the information is.
Cheers

Is there a way to find the id of an ajax xmlhttprequest?

One of my pages has about 5 jQuery AJAX calls that fire off as soon as the page loads. I want to track each AJAX call individually and get it an id. How do I do this?
Download the Firefox browser and install the Firebug extension. That will let you track all the XMLHTTP request information for each request (as well as help you with plenty of other debugging issues).
Here's a basic overview: http://getfirebug.com/network

Iframe vs normal / ajax get request

I have a page that gathers environment status from a couple of IBM WebSphere servers using iframes similar to this:
<iframe src="http://server:9060/ibm/console/status?text=true&type=server&node=NODE&name=ServerName_server_NODE"></iframe>
and it happily prints out "Started" or "Unavailable" etc. But if I load the same url in a normal browser sometimes it works, sometimes it does not? Some of them are showing a login page, while others are simply return HTTP code 500.
So whats the difference between loading the page through an iframe vs through a browser?
I can tell you that the iframe solution works no matter which machine I am doing it on, so I do not belive it has anything to do with the user whos opening the page. And before you ask, why not keep the solution that works, well its because it takes a long time to open the page with the iframes vs a page where everything is requested through ajax.
Update: Using jQuery to perform the ajax call returns "error" and "undefined" for the servers that I can't see in a normal browser.
One difference is an iframe has to render the view while XHR would not.
An iframe is essentially the same as opening with the browser. In both cases the browsers credentials are used, so there will be no difference between the two.
Secondly, loading something in an iframe should take the same amount of time as requesting it through XHR, since in both cases the browser makes an HTTP request and waits for the response. Although I should add that an iframe will take time to render the content onto the page. However if you plan on displaying it with ajax anyways, an iframe/xhr solution will be more or less the same.
In case of ajax request same origin policy (which restricts cross domain call) comes into picture. So you can't make cross domain call using xhr. Alternative for same is embed flex swf file in your page as activex control and make flex call through javascript and then flex is responsible to make cross domain call (flex can if targeted domain allows cross domain using crossdomain.xml) and renders result using javascript again.

Resources