Before you start
In this tutorial, you will write code for Ajax specific calls, review code that manipulates the DHTML of the page, and follow through the process of a complete round trip Ajax call from the browser to the server. The entire application is several hundred lines long, but we'll only ask you to code the important components while the rest will be provided. The steps are:
- Write browser independent code for creating XMLHttpRequest (XHR) and processing XML document objects.
- Send Ajax requests to the server and manipulate the returned results.
- Retrieve and manipulate the servlet context from the portlet configuration for dynamically accessing the Ajax servlet included in the portlet .war file.
- Deploy the portlet application onto WebSphere® Portal and see the results.
We will also review the code that manipulates the data for this particular application, including how to:
- Enable and disable form elements during asynchronous Ajax calls.
- Use DHML to update select boxes after new data is retrieved from the Ajax call.
- Dynamically update HTML <div> area tags using innerHTML to replace the portions of the Web page.