The uri resolves to an
absolute URI using the window.document.baseURI property??”in other
words, relative URIs will be resolved in the same way that the browser
resolves relative URIs. The async parameter specifies whether the
request is asynchronous; the default value is true. To send a synchronous
request, set the parameter to false. For servers that require
authentication, the optional username and password parameters may
be supplied. After calling the open()method, the XMLHttpRequest
objects sets its readyState property to 1 (Open) and resets the
responseText, responseXML, status, and statusText
properties to their initial values. It also resets the request headers. Note that
the object resets these values if the open() method when readyState
is 4.
1.4.3 The send() Method
After preparing a request by calling the open() method, the request is
sent to the server. The send()method may be called only when the
readyState value is 1, otherwise the XMLHttpRequest object raises
an exception. The request gets sent to the server using the parameters
supplied to the open() method. The send() method returns
immediately when the async parameter is true, letting other client
6 1 What is Ajax?
script processing continue. The XMLHttpRequest object sets the
readyState value to 2 (Sent) after the send() method has been
called. When the server responds, before receiving the message body, if
any, the XMLHttpRequest object sets readyState to
3(Receiving).
Pages:
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33