[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.frontpage.programming

Update city field based on zip field

=?Utf-8?B?cm9kY2hhcg==?=

4/22/2004 9:33:00 PM

I have an asp page where a user can add a new client
info. The fields on the page are the typical name,
address, phone, etc.

I have a sql 2k db with a tblzip with fields zipcode,
city, state.

When the user enters in a zip in the zip field, I want
them to click on a button and it would get the
corresponding city and state from the table and
autopopulate the city/state field on the page. I don't
want to use an array or move to another page because I
want to keep the data in the other fields and the user
still needs to finish entering other info on the page.

Anyone have a sample of this? I have seen other codes
where it does move to another page, but I don't want that.

Ngan

1 Answer

Rhonda

4/23/2004 6:36:00 PM

0

You could javascript to do it on the onblur event of the text field. It could quite complicated. You could use and xml file with cities based on the zip code and search through the xml in the javascript function to populate the next field. I don't have a sample off hand but could put something short together for you if you like. Email me if you do

Rhonda