looking for zip code to state autocomplete

M

McKirahan

Zen Masta said:
I'm looking for a script that will auto complete the state field when
someone enters their zipcode.

I'm currently using http://javascript.internet.com/forms/zip-to-state.html
but its kind of out dated and often returns null. Does anyone know of a more
up-to-date version or one that is updated regularly? It doesn't have to be
free.

Basically, the state can be identified from the first
three digits of a zip code; (one exception is noted below).

You could write your own lookup around this data:

005 =NY=New York
010-027=MA=Massachusetts
028-029=RI=Rhode Island
030-038=NH=New Hampshire
039-049=ME=Maine
050-059=VT=Vermont
055 =MA=Massachusetts
060-069=CT=Connecticut
063 =NY=New York
070-089=NJ=New Jersey
100-149=NY=New York
150-196=PA=Pennsylvania
197-199=DE=Deleware
200 =DC=District of Columbia
201 =VA=Virginia
202-205=DC=District of Columbia
206-219=MD=Maryland
220-246=VA=Virginia
247-268=WV=West Virginia
270-289=NC=North Carolina
290-299=SC=South Carolina
300-319=GA=Georgia
320-349=FL=Florida
350-369=AL=Alabama
370-385=TN=Tennessee
386-397=MS=Mississippi
398 =GA=Georgia
400-427=KY=Kentucky
430-459=OH=Ohio
460-479=IN=Indiana
480-499=MI=Michigan
500-528=IA=Iowa
530-549=WI=Wisconsin
550-567=MN=Minnesota
570-577=SD=South Dakota
580-588=ND=North Dakota
590-599=MT=Montana
600-629=IL=Illinois
630-658=MO=Missouri
660-679=KS=Kansas
680-693=NE=Nebraska
700-714=LA=Louisiana
716-729=AR=Arkansas
730-749=OK=Oklahoma
733-799=TX=Texas
800-816=CO=Colorado
820-831=WY=Wyoming (+83414)
832-838=ID=Idaho
840-847=UT=Utah
850-865=AZ=Arizona
870-884=NM=New Mexico
885 =TX=Texas
889-898=NV=Nevada
900-961=CA=California
967-968=HI=Hawaii
970-979=OR=Oregon
980-994=WA=Washington
995-999=AK=Alaska

I generated the above from this link:
http://www.downloadzipcode.com/

I ignored those other than states plus DC;
for example, Guam, Puerto Rico, et.al.

I found one glaring anomoly: 83414 is in Wyoming
while all other 834-prefixed zip codes are in Idaho!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top