Once collected all the items that need the merge all in a string to pass as parameters to the next page.
Code:
var param= 'name=' + nunber + '&surname=' + apellido + '&direction=' + direction;
Once assembled and our parameters we lack the direction to which we send our parameters, and which we can recover the data.
Code:
var url = 'paginaReceptora.php';
And now the call to the object that we perform the query using Ajax and we send the data to the page defined above.
Code:
var ajaxRequest = new Ajax.Request( url , { method: 'get', parameters: param , asynchronous: true, onComplete: showResponse }); function showResponse(xmlHttpRequest, responseHeader)
As we can see in bold, have the 2 variables that we defined before as the value of tuna over onComplete send us the role showResponse as our Ajax request has returned any results. It is where we define the actions we want to perform once given the data, so here our imagination and our application rule.
Bookmarks