Why URL Data does not shows for GET method in ajax? - 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

Related

ajax url with dynamically generated page

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

how to make a request like ajax

According to this website: I am trying to make a request, send data, and hope to get the result like json format, but not have to be.
In the sandbox page, I've checked the javascript, (I am using Chrome browser, you can go to "resources" -> Frame folder -> sandbox.ala.org.au), it uses AJAX to send and get data.
For example, there is a function (parseColumns), which is using ajax for sending data and getting result.
Is there any other way instead of ajax that could make a request to the server and get the result data? Because I am trying to create an application work similar with the sandbox.
One alternative is to make regular http requests. The problem with this approach is that you have to decipher the data format for input and output.
You can see all the request/response traffic in details, from and to your browser, using firebug (https://getfirebug.com/) and enabling the "net" tab
when you mouse over the "POST" line in the URL column, it shows you the complete URL. Click on the (+) to expand the request item to see details on the request.

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

Google chrome extension read on page sequest

I have a page with a middle ajax frame. This frame does a lot of requests. Last 2 requests are always this:
Last-1) Request GET page with url www.mysite.com/page1.php and the page response have always a text with "true" or "false".
Last) POST request with url www.mysecondsite.com/page2.php and the page response is empty.
I need to write an extension that reads if last-1 request is True or False and do something when last request is finish.... I tried use chrome.webRequest library but it didn't work...
How can I do this?
Edit: I know this, but I don't want script to do the request... Request are done by page because site need do some operation. I only need an extension to read this request.... but don't do it!
Edit2: I don't want to modify code on page.... I want only to check the response of this page (tab) at some AJAX request. I cant do ajax request or modify script.. only read response, is this possible?
You could make request to other sites using XMLHttpRequest object.
Chrome extension tutorial
Depending on how complex it is you could try replacing the function on the page that does the request with a copy that does the same but also sends the info to your extension.
Its hard to give advise without seeing the page in question.

What causes Firefox to make a GET request after submitting a form via the POST method?

What causes Firefox to follow a POST request with a GET request when submitting a form via the POST method? The GET method is sent to the same url as the POST method but without the request parameters.
If you change the form method to GET, it will result in two identical GET requests.
This is a bug in Firefox 3. This happens when the response to the POST contains an image tag with an empty source attribute. eg <img src=""/>
The URL POSTed to might be returning a Redirect -- that would cause a GET. This is commonly done so that the page can be refreshed without reposting.
Probably there is some javascript involved. The form is submitted as a result of an onclick event in an anchor with: href="..." onclick="..form.submit()"

Resources