Demo of a Sequence or Ajax Requests

Sending a POST request followed by a GET command to retrieve the results.

This demo shows how you sent several Ajax request sequentially, the second one using the results of the first one.
It makes use of a PHP script to performs a processing, and a JavaScript program to retrieve and display the results, and of course the ajax.js script..

1) Data are sent to the script by a POST request.
2) The script performs some processing of them.
3) The script stores the results into a text file.
4) The GET command retrieve these results and displays them on the page.

For security issue, the name of this text file must be defined on the server and checked by the PHP script.

In this simple demo, you have to type a text in lowercase, and the PHP script converts it to uppercases and store it in the text file.

Enter a text below and click on "POST and GET Sequence"

Empty.

(c) xul.fr.