view source
Ajax Autocomplete List Cities JSON-P API
Here is an example of how to add an Ajax Autocomplete Cities List to any website without generating any cross-site scripting errors, and without the need for any server side code or proxies. Fortunately there is not a lot that you need to know to get this running, but if you are interested in knowing how it works and why it does not raise site cross-scripting errors, then checkout the links below the following sample code. This script requires no server side code (php or otherwise) as it uses one of Geobytes’ free web services to get the list of cities.