PART IV
Appendix C: AjaxTCR Library Reference 615
OptionDescriptionDefaultExampleonTimeout : functionCallback that is invoked when a timeout occurs. If there are retries and continual failures, this callback will only be called on the final timeout. Use onRetry if you need callbacks on each attempt..function () {}onTimeout : showDelayoutputTarget : objectWhen specified the request’sresponseTextwill be automatically inserted into the specified object in conjunction with the preference set in the option insertionType. The object should be a reference to a DOM element or a string to be used that references an existing DOM element by itsidattribute.TheuseRawoption can be set tofalseif a user desires to override the immediate placement of content but still use this property as a reference.null outputTarget : "responseOutput"or
var responseOutput = document. getElementById("responseOutput");outputTarget : responseOutput;password : stringThe password to be used when addressing HTTP authentication challenges. Only supported with the XHR transport."" password : "alpha1999"payload : stringA properly encoded string (or object) to be submitted in a query string or message body depending on the HTTP method used. VariousAjaxTCR.datamethods likeencodeValue()andserializeForm()may be used to quickly form a payload. The payload must be in the format in which it is going to be used."" payload : "spacelord=Ming+of+Mongo&evil=true"preventCache : BooleanWhen set totrue, attempts to disable cachingby setting the request header If-Modified-Since to a very old date. Users may also desire to add a unique query string to their payload as well.false preventCache: trueprogressInterval : millisecondThis value is used to indicate how often in milliseconds the request should be polled for progress updates and therefore call the callback specified in onProgress. Defaults to 1 second (1000 ms).1000 progressInterval : 50TABLEC-2Options Object Properties for Making Requests (continued)