This content is reprinted from Real-World AJAX: Secrets of the Masters
published by SYS-CON Books. To order the entire book now along with companion
DVDs for the special pre-order price, click here for more information. Aimed
at everyone from enterprise developers to self-taught scripters, Real-World
AJAX: Secrets of the Masters is the perfect book for anyone who wants to
start developing AJAX applications.
Creating a Live Search Web Service with PHP
To keep this simple we won't use a database. Instead we'll use an array of
values.
Create a new file, StateList.php, with the following in it:
Listing 6.10
$StateList = array(
'ALABAMA' => 'AL', 'ALASKA' => 'AK', 'AMERICAN SAMOA' => 'AS',
'ARIZONA' => 'AZ', 'ARKANSAS' => 'AR', 'CALIFORNIA' => 'CA',
'COLORADO' => 'CO', 'CONNECTICUT' => 'CT', 'DELAWARE' => 'DE',
'DISTRICT OF COLUMBIA' => 'DC', 'FEDERATED ... (more)
This content is reprinted from Real-World AJAX: Secrets of the Masters
published by SYS-CON Books. To order the entire book now along with companion
DVDs for the special pre-order price, click here for more information. Aimed
at everyone from enterprise developers to self-taught scripters, Real-World
AJAX: Secrets of the Masters is the perfect book for anyone who wants to
start developing AJAX applications.
Advanced Techniques
Multiple Requests/Responses in a Single Call
The great advantage of AJAX clients is that they can communicate back to the
server without interrupting what t... (more)
This content is reprinted from Real-World AJAX: Secrets of the Masters
published by SYS-CON Books. To order the entire book now along with companion
DVDs for the special pre-order price, click here for more information. Aimed
at everyone from enterprise developers to self-taught scripters, Real-World
AJAX: Secrets of the Masters is the perfect book for anyone who wants to
start developing AJAX applications.
Building AJAX-Friendly Web Services
When developers first realize what an AJAX client can do, they are often
especially excited about its potential in playing the role of the V... (more)
This content is reprinted from Real-World AJAX: Secrets of the Masters
published by SYS-CON Books. To order the entire book now along with companion
DVDs for the special pre-order price, click here for more information. Aimed
at everyone from enterprise developers to self-taught scripters, Real-World
AJAX: Secrets of the Masters is the perfect book for anyone who wants to
start developing AJAX applications.
Using TinyAjax to Create Live Search
Using a server-side framework will let you shift some of the processing from
the client back to the server. In our example we'll consume ou... (more)
This content is reprinted from Real-World AJAX: Secrets of the Masters
published by SYS-CON Books. To order the entire book now along with companion
DVDs for the special pre-order price, click here for more information. Aimed
at everyone from enterprise developers to self-taught scripters, Real-World
AJAX: Secrets of the Masters is the perfect book for anyone who wants to
start developing AJAX applications.
Flavors of XML
Earlier we compared formatting payloads in JSON versus XML. One of the chief
advantages of sticking with XML is that it can be validated, that is, that
dispara... (more)