Type is string.
asynchronous Specifies if the XMLHttpRequest be sent
asynchronously. Default is true.
postBody If HTTP request method is ???post??™,
specifies the request??™s body.
requestHeaders Specifies an array of HTTP headers to be
sent with the request.
onLoading, onLoaded, onInteractive,
onComplete
Specifies the functions that are invoked
at various stages of the request. Recieves
an argument representing the
XMLHttpRequest and an argument
representing the response header.
3.2 Overview of Prototype 49
Table 3.1 (continued)
Property Description
onSuccess, onFailure,
onException
Specifies the function to be invoked
when AJAX request completes
successfully, or fails, or generates an
exception. Similar to onComplete
function, the function recieves an
argument representing the
XMLHttpRequest and an argument
representing the response header.
3.2.9 Ajax.Updater Class
Ajax.Updater class is a sub class of Ajax.Request class and is
used to update a specified DOM element with an XMLHttpRequest
response. The Ajax.Updater constructor may be used to create an
Ajax.Updater object as shown below.
var ajaxRequest=new Ajax.Updater(container, url,
options);
The container parameter may be an element id, an element object,
or an object with two properties; object.success and
object.failure. The object.success element is used for
updating if the Ajax call succeeds and the object.
Pages:
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65