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

Deepak Vohra

"Ajax in Oracle JDeveloper"

Data added to the HTML form is sent
asynchronously to the server. On the server side, a HTTP servlet
processes the input from the form and returns a response as an XML DOM
object. In the client application the response from the server is processed
and a message is output about the validity of the data added. In the
example application, an input form is used to create a catalog entry that is
sent to the server and updated in the database in a server side Servlet. A
developer would be interested in ascertaining if a catalog Id specified in
the input form is not already taken in the catalog database. As the client
specifies the catalog Id field, an XMLHttpRequest is sent to the server
with each modification in the input field. A response from the server in the
form of an XML DOM object provides information to the client about the
validity of the catalog Id value specified. Without Ajax, the complete form
would have to be posted to the server and the client JSP reloaded after a
response is received from the server. The procedure to send an
XMLHttpRequest request is as follows.
1. Create a XMLHttpRequest object.
2. Open a XMLHttpRequest request.
3. Register a callback method to be invoked when the request is
complete.
4. Send a XMLHttpRequest request.
5. Process the XML response and set HTML page content.
An XMLHttpRequest request is initiated from an HTML form that
has input fields for creating a catalog entry.


Pages:
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48