From: tedd on
Hi gang:

I've worked a bit more on my demo and would like to see if it passes
your review. I've tested the DEMO on all the modern browsers (IE7,
IE8, Safari, FF, Chrome, et al) and it works:

http://php1.net/b/zipcode-states/index.php <- works sweet on my iPad :-)

You might give it a try.

The point of the demo is pretty simple in concept, but was a bit more
difficult (at least for me) to achieve.

On first load, the demo defaults to Lansing, MI 48901 (a location close to me).

When the user selects a State, a javascript routine (via AJAX) runs a
php script to search the database for a list of cities and upon
retrieving such data populates the City Selection Control. The php
script also populates the Zip Code Selection Control with a list of
the Zip Code(s) found for the first City.

When the user selects a City, then again a javascript routine runs a
php script to search the database for all the Zip Codes associated
with that City and then populates the Zip Code Selection Control.

What is neat about this DEMO is that the Selection Controls are
brought forward via DOM scripting. The php script that contains the
database calls and generates the Selection Control is not shown until
the user does something, such as visiting the site or changing a
Selection Control. At which time, an AJAX routine triggers the
running of a php script that retrieves all the data necessary to
populate the Selection Controls and then places those controls on the
page within the <div id="myspan"> </div>

This is just a neat DEMO to show how to get the server and client to
communicate to each other without requiring a browser refresh and
thus making the process behave more like a desktop application.

Cheers,

tedd

--
-------
http://sperling.com http://ancientstones.com http://earthstones.com