AJAPH: Send AJAX request and process the responses

Recommend this page to a friend!
  Info   View files View files (8)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2021-11-28 (6 days ago) RSS 2.0 feedNot enough user ratingsTotal: 416 This week: 1All time: 79 This week: 4Up
Version License JavaScript version Categories
ajaph 1.3GNU General Publi...1.0AJAX
Description Author

This object can send AJAX request and process the responses.

It can send HTTP GET or POST requests to a given URL using AJAX.

The requests may be synchronous or asynchronous. Optional parameters may be sent with the request.

The object my set a given page element with an image to while the AJAX response is not returned.

It may also handle the request response as HTML, XML, JSON or text.

Picture of Pierre-Henry Soria
Name: Pierre-Henry Soria <contact>
Classes: 4 packages by
Country: United Kingdom
Age: 31
All time rank: 232 in United Kingdom
Week rank: 7 Up2 in United Kingdom Equal
Innovation award
Innovation award
Nominee: 3x


## Overview

This class makes use of Ajax easier. It allows you to make *asynchronous* (default) or *synchronous* request.

## How to use this

Please see the small example I did in the example folder.
You can also do your testing in here.

## Example

* HTML Code:

        <h1>The Member(s):</h1>
        <div id="data"></div>

* JS Code:

        // Create object
        var oAjax = new AJAPH;
        // GET method
        oAjax.send("GET", "member_search.pl", "sex=m&active=1&age=18").setResponseHtml("data");
        // POST method
        oAjax.send("POST", "member_data.pl", "user_id=2939&visible=y").setResponseHtml("data");

_Attention, you need JavaScript after the HTML id that must receive the data otherwise it will not work because JavaScript will not find the html ID._

## Author

Pierre-Henry Soria

## License

[General Public License](http://www.gnu.org/copyleft/gpl.html) (GPL) 3 or later.
  Files folder image Files  
File Role Description
Files folder imageexample (5 files)
Plain text file AJAPH.js Class Class source
Accessible without login Plain text file license.txt Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  example  
File Role Description
  Accessible without login Plain text file asynchronous.html Example Auxiliary data
  Accessible without login Plain text file asyn_data.txt Data Auxiliary data
  Accessible without login Image file loading.gif Icon Icon image
  Accessible without login Plain text file synchronous.html Example Auxiliary data
  Accessible without login Plain text file syn_data.txt Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
This week:1
All time:79
This week:4Up