Tag Archives: AJAX

retrieve data through ajax

In order to retrieve data via ajax, we give it some parameter data like requestId, andn telNum, then it will return a data through a data parameter. In our case, it is data.

Send html data via jQuery and AJAX to JSON url

You got whole bunch of data in textboxes and combo boxes. You retrieve those data by their id using jQuery like so:

Once you get these data…you pass it into ajax’s data parameter and you’re basically done:

Different ways of ajax-ing

..a good way

one way…. 😀

…another way….

you can also use:

or like this:

Basic AJAX request to a url

This is just to set up ajax.

The ajaxpost function gets called when we push the submit button. Basically, When our servlet does a ‘out.println’ from its Writer, we want it to go to id passwordhelpstatus’s id html:

We then gets the textfield ‘userEmail’ and use it as a parameter to send to our servlet when we do the AJAX request. An AJAX request here involves opening the url with a request option of POST or GET, then set the request header, and then finally send the parameter.

This is the main function of processing an AJAX request.
It involves, receives a response, and then

  • opening the url
  • setting a header
  • finally setting the parameters

Whenever we click the submit button, we run the ajax, which calls the function ajaxpost().

in your HTML: