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 38 | Next

Deepak Vohra

"Ajax in Oracle JDeveloper"

open(???GET???, ???validateForm?catalogId=???+
encodeURIComponent(catalogId.value), true);
Register a callback event handler for the XMLHttpRequest using the
onreadystatechange property. In the example application, the
callback method is the processRequest function.
xmlHttpRequest.onreadystatechange=processRequest;
Send the XMLHttpRequest to the server using the send message. As
the HTTP method is GET, data sent with the send method is set to null.
xmlHttpRequest.send(null);
2.4 Processing an Ajax Request on the Server Side 31
As the callback method is processRequest, the
processRequest function is invoked when value of the readyState
property changes. In the processRequest function, the readyState
property value is retrieved to determine if request has loaded completely
and if HTTP status is ???OK???.
function processRequest(){
if(xmlHttpRequest.readyState==4){
if(xmlHttpRequest.status==200){
processResponse();
}
}
}
2.4 Processing an Ajax Request on the Server Side
To the server an Ajax request is just like any other HTTP request. In this
section, the server side processing of the XMLHttpRequest request
sent to the server is discussed. The XMLHttpRequest is sent to url
validateForm?catalogId=catalogId. Variable catalogId is
the value of parameter catalogId. As the
FormValidationServlet is mapped to url validateForm, the
servlet gets invoked. As the XMLHttpRequest method is GET, the
doGet method of the servlet gets invoked.


Pages:
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
druga wojna światowa Free English grammar and study guid hotel jelenia góra Russian bride counter strike 1.6