SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 26 | Next

Deepak Vohra

"Ajax in Oracle JDeveloper"

Create an XML
string that contains instructions to be processed on the client side. The
XML string must have a root element.
out.println(???valid???);
The XMLHttpRequest object is designed to handle responses
consisting of plain text or XML; but a response may be of another type if
the user agent (UA) supports the content type.
The XMLHttpRequest object calls the event handler registered with
onreadystatechange when the request state changes. Therefore,
your event handler should check the readyState value and the HTTP
status before processing the response. When the request has completed
loading, which corresponds to readyState value 4, and the HTTP
status is ???OK???, the response has completed, and we may invoke a
JavaScript function to process the response content. The following script
checks the values and invokes a processResponse() method when
the response is complete.
function processRequest(){
if(xmlHttpReq.readyState==4){
if(xmlHttpReq.status==200){
processResponse();
}
}
}
The processResponse() method uses the XMLHttpRequest
objects' responseXML and responseText properties to retrieve the
HTTP response. As explained above, the responseXML is available
only if the media type of the response is text/xml,
application/xml or ends in +xml. The responseText property
10 1 What is Ajax?
returns the response as plain text. For an XML response we would retrieve
the content as follows.


Pages:
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38