Click to See Complete Forum and Search --> : Enter Zip and auto populate City and State


ammwebmaster2
02-27-2009, 10:16 AM
I have a form set up in asp using Dreamweaver with a text box for Zip, City, and State. I want a person to fill in zip and then when they move to the next field to have it fill in city and state. I also have a database called zipcodes and a table called zip with zip, city, state fields. Can anyone tell me how to do this. I have tried so many different things and just can't get it to work.:confused:

Kuriyama
03-02-2009, 11:36 AM
AJAX is the best way for this.

ammwebmaster2
03-02-2009, 11:54 AM
I know nothing about AJAX. Can you help me or do you have some script or idea of how to do it?:(

Kuriyama
03-02-2009, 02:22 PM
http://www.w3schools.com/Ajax/default.asp

I recommend you download and learn a JavaScript API. Prototype(www.prototypejs.org) or JQuery(www.jquery.com) are nice ones. There are a lot of different ways to code an AJAX app. Read up on it and experiment.

AJAX in a nut shell. . .

You have a server side page sitting out that. It doesn't have to take any query string parameters, but most of the time they do. This page runs some server side script, pulls crap out of the data base and writes it to that page. Then JavaScript pulls that information and posts it back on the page it was called from. It's a behind the scenes request.

Good luck.

zahidraf
03-04-2009, 01:00 AM
Ajax is fine .

Here are good example.

www.ajaxdaddy.com


Dell Studio 15 laptop (http://www.zahipedia.com/2009/03/03/dell-studio-15-special-edition-laptop/)