AJAX - Javascript Function Library
AJAX : Overview | Reference | Quick Start | Examples | Download
Arrays : Overview | Reference | Download
Ajax : Reference
Global Constants
| ajax_release_date | String representing the release date of the library |
|---|---|
| ajax_release_version | String representing the release version of the library |
| ajax_enabled | Boolean indicating if the client's browser supports asynchronous calls |
Request Object Members
| HttpRequest | The native HTTPRequest object (e.g. HttpRequest.status is the HTTP status code) |
|---|---|
| URL | Your original URL (and GET) string |
| POST | Your original POST string |
| userObject | You original userObject |
| hCallback | Pointer to your callback function |
| requestType | (will enumerate to ajax_requestType_string in 1.x.y) |
| retry() | This function drops the current HTTPRequest and spawns a new one. But only after the current one has completed. |
ajax_RequestString()
RequestObject = ajax_RequestString( hCallback , sURL , sPost , userObject )
| hCallback | Handle to User Callback Function |
|---|---|
| sURL | URL + GET request to make (url.cgi?foo=bar) |
| sPost | POST (sun=yellow&sea=blue), leave as "" to only make a GET request |
| userObject | User Object for the Callback Function |
User Callback function signature
function myCallBack( responseString , statusCode , requestObject ){ }
| responseString | The response from the server. |
|---|---|
| statusCode | The ajax_status code of the response. |
| requestObject | The original request object that was created to handle the request |
User Response Signature
nnn\n...
| nnn | Numeric response code, usually 200 |
|---|---|
| \n | ASCII LF (0x0A) |
| ... | User's response Text,HTML,XML or JSON etc. |
Status Codes
| ajax_statusCode_null | 0 |
|---|---|
| ajax_statusCode_ok | 200 |
| ajax_statusCode_error | 500 |
| ajax_statusCode_user | 600 |