The
options are specified as a JSON; the method property specifies that
the request be sent using HTTP GET method; the default method is POST.
The method value (get/post) is required to be specified in lowercase.
The parameters property specifies the parameters to be sent with the
url. The onComplete property specifies the function to be invoked
when the request is complete. Similarly, onLoading, onLoaded, and
onInteractive property functions may be specified. The onLoading
property represents the state when an XMLHttpRequest has been
initiated, but the request has not yet been sent. The onLoaded property
represents the state when the request has been sent, but a response has not
yet been received. The onInteractive property represents the state
when the some of the response has been received. The onComplete
property represents the state when all of the response has been recieved.
The onComplete property function, or a property function representing
some other state of the request, is invoked by an argument containing the
XMLHttpRequest object and another argument containing the response
HTTP header. Some of the commonly used Ajax.Request options are
discussed in Table 3.1.
Table 3.1 AjaxRequest Options
Property Description
method Specifies method of HTTP request.
Default value is ???post??™. Type is string.
parameters List of parameters that are sent with the
HTTP request.
Pages:
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64