It returns void.
CHAPTER 1 ?– INTRODUCING AJAX 10
xmlHttp.open("GET" , "theURL" , true , "MyUserName" , "MyPassword");
The send method issues the request to the server. It is passed a single parameter containing
the relevant content. Had the original request been declared as asynchronous
(using the boolean flag mentioned earlier), the method would immediately return; otherwise,
this method would block until the synchronous response was received. The content
parameter (which is optional) can be a DOM object, an input stream, or a string.
xmlHttp.send("Hello Server");
The setRequestHeader method takes two parameters: a string for the header and a
string for the value. It sets the specified HTTP header value with the supplied string.
xmlHttp.setRequestHeader("Referrer","AGreatBook");
The getAllResponseHeaders method returns a string containing the complete set of
response headers from the XMLHttpRequest object after the HTTP response has come back
and containing their associated values. Examples of HTTP headers are ???Content-Length???
and ???Date???. This is a complement to the getResponseHeader method, which takes a parameter
representing the name of the specific header you are interested in.
Pages:
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53