Class AjaxRequest

Object
   |
   +--AjaxRequest

Field Summary
 boolean aborted
          An internal flag to indicate whether the request has been aborted
 boolean async
          Whether or not the request will be asynchronous.
 boolean generateUniqueUrl
          Since some browsers cache GET requests via XMLHttpRequest, an additional parameter called AjaxRequestUniqueId will be added to the request URI with a unique numeric value appended so that the requested URL will not be cached.
 string groupName
          The name of the group that this request belongs to, for activity monitoring purposes
 string method
          The method of the request, either GET (default), POST, or HEAD
 functionReference onComplete
          A function reference assigned will be called when readyState=4
 functionReference onError
          A function reference assigned will be called after onComplete, if the statusCode != 200
 functionReference onGroupBegin
          If this request has a group name, this function reference will be called and passed the group name if this is the first request in the group to become active
 functionReference onGroupEnd
          If this request has a group name, and this request is the last request in the group to complete, this function reference will be called
 functionReference onInteractive
          A function reference assigned will be called when readyState=3
 functionReference onLoaded
          A function reference assigned will be called when readyState=2
 functionReference onLoading
          A function reference assigned will be called when readyState=1
 functionReference onSuccess
          A function reference assigned will be called after onComplete, if the statusCode=200
 functionReference onTimeout
          If a timeout period is set, and it is reached before a response is received, a function reference assigned to onTimeout will be called
 Object parameters
          The parameters is an object holding name/value pairs which will be added to the url for a GET request or the request content for a POST request
 string password
          The password used to access the URL
 string queryString
          The query string to be added to the end of a GET request, in proper URIEncoded format
<private>  int requestIndex
          The sequential index number of this request, updated internally
<private>  boolean responseReceived
          Indicates whether a response has been received yet from the server
 string responseText
          After a response has been received, this will hold the text contents of the response - even in case of error
 xmlNode responseXML
          After a response has been received, this will hold the XML content
 int status
          After a response has been received, this will hold the status code of the response as returned by the server.
 string statusText
          After a response has been received, this will hold the text description of the response code
 int timeout
          Timeout period (in ms) until an async request will be aborted, and the onTimeout function will be called
 string url
          The url that the request will be made to, which defaults to the current url of the window
 string username
          The username used to access the URL
<private>  XMLHttpRequest xmlHttpRequest
          The XMLHttpRequest object used internally
<static>  Object numActiveAjaxGroupRequests
          An object holding the number of active requests for each group
<static>  int numActiveAjaxRequests
          The number of total AjaxRequest objects currently active and running
<static>  int numAjaxRequests
          The total number of AjaxRequest objects instantiated
 
Constructor Summary
AjaxRequest ()
            The AjaxRequest class is a wrapper for the XMLHttpRequest objects which are available in most modern browsers.
 
Method Summary
 Object getAllResponseHeaders()
           Returns the results of XMLHttpRequest.getAllResponseHeaders().
 string getResponseHeader(<string> headerName)
           Returns the the value of a response header as returned by XMLHttpRequest,getResponseHeader().
 <private>  void handleArguments(<Object> args)
           An internal function to handle an Object argument, which may contain either AjaxRequest field values or parameter name/values
 void process()
           The process method is called to actually make the request.
<static> <private>  void doRequest(method,args)
           The internal method used by the .get() and .post() methods
<static> void get(<Object> args)
           Make a GET request.
<static> Object getXmlHttpRequest()
           Returns an XMLHttpRequest object, either as a core object or an ActiveX implementation.
<static> boolean isActive()
           See if any request is active in the background
<static> void post(<Object> args)
           Make a POST request.
<static> string serializeForm(<FormReference> theform)
           Serialize a form into a format which can be sent as a GET string or a POST content.It correctly ignores disabled fields, maintains order of the fields as in the elements[] array.
<static> boolean submit(<FormReference> theform, <Object> args)
           Submit a form.

Field Detail

aborted

boolean aborted

async

boolean async

generateUniqueUrl

boolean generateUniqueUrl

groupName

string groupName

method

string method

onComplete

functionReference onComplete

onError

functionReference onError

onGroupBegin

functionReference onGroupBegin

onGroupEnd

functionReference onGroupEnd

onInteractive

functionReference onInteractive

onLoaded

functionReference onLoaded

onLoading

functionReference onLoading

onSuccess

functionReference onSuccess

onTimeout

functionReference onTimeout

parameters

Object parameters

password

string password

queryString

string queryString

requestIndex

<private> int requestIndex

responseReceived

<private> boolean responseReceived

responseText

string responseText

responseXML

xmlNode responseXML

status

int status

statusText

string statusText

timeout

int timeout

url

string url

username

string username

xmlHttpRequest

<private> XMLHttpRequest xmlHttpRequest

numActiveAjaxGroupRequests

<static> Object numActiveAjaxGroupRequests

numActiveAjaxRequests

<static> int numActiveAjaxRequests

numAjaxRequests

<static> int numAjaxRequests

Constructor Detail

AjaxRequest

AjaxRequest()

Method Detail

getAllResponseHeaders

Object getAllResponseHeaders()

getResponseHeader

string getResponseHeader(<string> headerName)

handleArguments

 <private> void handleArguments(<Object> args)

process

void process()

doRequest

<static>  <private> void doRequest(method,args)

get

<static> void get(<Object> args)

getXmlHttpRequest

<static> Object getXmlHttpRequest()

isActive

<static> boolean isActive()

post

<static> void post(<Object> args)

serializeForm

<static> string serializeForm(<FormReference> theform)

submit

<static> boolean submit(<FormReference> theform, <Object> args)

Documentation generated by JSDoc