Recommend this page to a friend!
  Classes of Pierre-Henry Soria  >  AJAPH  >  >  Download  
Role: Documentation
Content type: text/plain
Description: Documentation
Class: AJAPH
Send AJAX request and process the responses
Author: By
Last change: Nothing important
Improved and bug fixes
Date: 10 months ago
Size: 939 bytes


Class file image Download

## 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", "", "sex=m&active=1&age=18").setResponseHtml("data");
        // POST method
        oAjax.send("POST", "", "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]( (GPL) 3 or later.