Webmaster Web Tools
Easy to Use Web Tools
Event Calendars, Flickr RSS Slideshows
RSS Scrollers, Podcast RSS feeds and more.
www.webpasties.com

Back to WebPasties
Back to Step #8

Final Thoughts

Using the XMLHttpRequest object to perform remote scripting is a pretty straight forward process. Although XML data can be retrieved pretty easily with the XMLHttpRequest object, it is not a requirement for you to use XML as your data format. For simple data such as in our ZIP code example, it actually makes more sense to not use XML. XML has downsides. One downside is that XML necessitates validation which has a performance impact. In addition, the XML representation of our data required much more bandwidth to transfer than the non-XML data.

The ZIP code data file that was provided could be out of date. Unfortunately, to use the latest data means that you will need to subscribe to a service. The USPS offers a Web service however it looks like you need to either agree to use their service for shipping exclusively with USPS or you need to pay them a large chunk of money. There are many companies that provide ZIP code data services that you can find easily on Google.

With the ZIP code example, we did not fool with the area code. Adding automatic completion of the area code is dirt easy to do. I just chose not to include it for the sake of making the example as concise as possible.

Download Code for All Steps



Check out my other work. Click the banner below.