I have a field where user inputs Zip code. Based on the value entered I want to populate city and state. How i can do this in jQuery?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use Google’s Map / Geocoding API, here is a quick demo:
http://jsfiddle.net/zwPvs/1/
edit: Since the user is communicating directly with Google’s servers, you don’t even have to pass in an IP address, they figure it out. They may even use some additional points of data beyond IP address, but not sure.