how to ajax response

the responsetext or responsexml property of the xmlhttprequest object use to get the response object from the server.


the ajax response responsetext property --

the ajax responsetext property retrieves the response body as string.

the ajax responsetext property values type is string.

if responsetext type is not the empty string or 'text', throw an 'invalidstateerror' exception and terminate the process.

 dom element  =     object.responsetext ;

example


the responsexml property --

the ajax responsexml property retrieves the response body as an xml document object model
(dom)object.

the ajax responsexml property values type is object .

if responsexml type is not the empty string or 'document', throw an 'invalidstateerror' exception and terminate the process.

 xmldocument  =     object.responsexml ;

example


the responsebody property

the ajax responsebody property retrieves the response body as an array of unsigned bytes.

the ajax responsebody was introduced in windows internet explorer 7.

 element   =     object.responsebody 

the ajax response property

the ajax response property returns the response received from the server.this property is read-only.

the ajax response received for the request or null if no response is received.

 element   =     object.response