Learning AJAX with Passion

آموزش آجاکس

Google
 

Thursday, December 21, 2006

XMLHttpRequest object methods

Method Description

abort() : Stops the current operation.

getAllResponseHeaders() : Returns all headers as a string.

getResponseHeader(x) : Returns header x as a string.

open(‘method’, ’URL’, asyn) : Specifies the HTTP method to be used (GET or POST as a string, the target URL, and whether or not the request should be handled asynchronously (asyn should be true or false, if omitted, true is assumed).

send(content) : Sends the data for a POST request and starts the request, if GET is used you should call send(null).

tRequestHeader(‘x’,‘y’) : Sets a parameter and value pair x=y and assigns it to the header to be sent with the request.

[The open object method is used to set up the request, and the send method starts the request by sending it to the server (with data for the server if the POST method is used).]

0 Comments:

Post a Comment

<< Home