Java Reference
In-Depth Information
Recipe #10.1: A Non-XML Based AJAX Site
Some AJAX sites do not use XML to transfer messages between the web browser and
web server. One common format is HTML. It is often very convenient for an AJAX application
to simply transmit new HTML that must be displayed to part of the web browser. To see an
example of this visit the following URL:
http://www.httprecipes.com/1/10/ajaxnonxml.php
This page contains two AJAX features. First, as you type the name of a US state, a drop
list is shown to help you narrow in on what state you would like to view. You can see this in
Figure 10.3. If you do not see the drop list, as you type the state name, make sure you have
JavaScript enabled.
Figure 10.3: An AJAX Drop-List
Once you select a state and click the “Search” button, you will see the second AJAX fea-
ture of this web site. Information about the state you choose is displayed. However, only the
information about the state you choose was transmitted to the web browser. You will notice
that you are still at the same URL. You can see a state displayed in Figure 10.4.
Search WWH ::




Custom Search