AJAX - Javascript Function Library

AJAX : Overview | Reference | Quick Start | Examples | Download

Arrays : Overview | Reference | Download

Ajax : Reference

Global Constants

ajax_release_dateString representing the release date of the library
ajax_release_versionString representing the release version of the library
ajax_enabledBoolean indicating if the client's browser supports asynchronous calls

Request Object Members

HttpRequestThe native HTTPRequest object (e.g. HttpRequest.status is the HTTP status code)
URLYour original URL (and GET) string
POSTYour original POST string
userObjectYou original userObject
hCallbackPointer 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 )
hCallbackHandle to User Callback Function
sURLURL + GET request to make (url.cgi?foo=bar)
sPostPOST (sun=yellow&sea=blue), leave as "" to only make a GET request
userObjectUser Object for the Callback Function

User Callback function signature

function myCallBack( responseString , statusCode , requestObject ){ }
responseStringThe response from the server.
statusCodeThe ajax_status code of the response.
requestObjectThe original request object that was created to handle the request

User Response Signature

nnn\n...
nnnNumeric response code, usually 200
\nASCII LF (0x0A)
...User's response Text,HTML,XML or JSON etc.

Status Codes

ajax_statusCode_null0
ajax_statusCode_ok200
ajax_statusCode_error500
ajax_statusCode_user600