outburst.jloop.com

5/17/2006

State Abbreviations

tim tim @ 2:52 pm — Filed under:

Ok, this is driving me nuts and I had to post this.

I am creating a simple form for one of our newest releases. It includes a drop down box for choosing your “State”. Now, you would think that if you searched for “State abbreviations” on google you would find a long list of abbreviations you could copy and paste and viola, have your drop down. HOWEVER, this is not the case. Everything I find is a table based site that has the state name in one column and the abbreviation in the other. Well, this doesn’t work because it’s sorted alphabetically by the state NAME, which is not alphabetical by state abbreviation!! ARGH!
So, my complaint I guess is, why, OH WHY!?! isn’t there a list of JUST alphabatized abbreviations where a developer like ME can go and copy and paste to populate my combo box…well, now there is, no thanks to YOU (internet community)!!!

(How nice, already in array format)

var stateList:Array = new Array(”",”AK”,”AL”,”AR”,”AS”,”AZ”,”CA”,”CO”,”CT”,”DC”,”DE”,”FL”,”GA”,”GU”,”HI”,”IA”,”ID”,

“IL”,”IN”,”KS”,”KY”,”LA”,”MA”,”MD”,”ME”,”MH”,”MI”,”MN”,”MO”,”MS”,”MT”,”NC”,”ND”,”NE”,”NH”,”NJ”,”NM”,”NV”,”NY”,

“OH”,”OK”,”OR”,”PA”,”PR”,”PW”,”RI”,”SC”,”SD”,”TN”,”TX”,”UT”,”VA”,”VI”,”VT”,”WA”,”WI”,”WV”,”WY”);

10 Responses to “State Abbreviations”

  1. jimbo Says:

    you are too kind my friend

    *throws a nickle accross the loft at you*

    heh.

  2. Betty Says:

    I found your site while I was searching for just the 2 letter list to put in a .csv for a form program. This list may help others also (50 US Staes + DC):

    AL
    AK
    AZ
    AR
    CA
    CO
    CT
    DE
    DC
    FL
    GA
    HI
    ID
    IL
    IN
    IA
    KS
    KY
    LA
    ME
    MD
    MA
    MI
    MN
    MS
    MO
    MT
    NE
    NV
    NH
    NJ
    NM
    NY
    NC
    ND
    OH
    OK
    OR
    PA
    RI
    SC
    SD
    TN
    TX
    UT
    VT
    VA
    WA
    WV
    WI
    WY

  3. Jackie Says:

    But I wanted a list with the 2 letter abbreviation followed by the state name! Whaaaa!!! There always has to be a whiner doesn’t there? :-)

  4. Tia Says:

    w00t! I LOVE you!

  5. landor Says:

    Array(’AK’ => ‘Alaska’, ‘AL’ => ‘Alabama’, ‘AR’ => ‘Arkansas’, ‘AZ’ => ‘Arizona’, ‘CA’ => ‘California’, ‘CO’ => ‘Colorado’, ‘CT’ => ‘Connecticut’, ‘DE’ => ‘Delaware’, ‘DC’ => ‘District of Columbia’, ‘FL’ => ‘Florida’, ‘GA’ => ‘Georgia’, ‘HI’ => ‘Hawaii’, ‘IA’ => ‘Iowa’, ‘ID’ => ‘Idaho’, ‘IL’ => ‘Illinois’, ‘IN’ => ‘Indiana’, ‘KS’ => ‘Kansas’, ‘KY’ => ‘Kentucky’, ‘LA’ => ‘Louisiana’, ‘MA’ => ‘Massachusetts’, ‘MD’ => ‘Maryland’, ‘ME’ => ‘Maine’, ‘MI’ => ‘Michigan’, ‘MN’ => ‘Minnesota’, ‘MS’ => ‘Mississippi’, ‘MO’ => ‘Missouri’, ‘MT’ => ‘Montana’, ‘NC’ => ‘North Carolina’, ‘ND’ => ‘North Dakota’, ‘NE’ => ‘Nebraska’, ‘NH’ => ‘New Hampshire’, ‘NJ’ => ‘New Jersey’, ‘NM’ => ‘New Mexico’, ‘NV’ => ‘Nevada’, ‘NY’ => ‘New York’, ‘OH’ => ‘Ohio’, ‘OK’ => ‘Oklahoma’, ‘OR’ => ‘Oregon’, ‘PA’ => ‘Pennsylvania’, ‘RI’ => ‘Rhode Island’, ‘SC’ => ‘South Carolina’, ‘SD’ => ‘South Dakota’, ‘TN’ => ‘Tennessee’, ‘TX’ => ‘Texas’, ‘UT’ => ‘Utah’, ‘VA’ => ‘Virginia’, ‘VT’ => ‘Vermont’, ‘WA’ => ‘Washington’, ‘WI’ => ‘Wisconsin’, ‘WV’ => ‘West Virginia’, ‘WY’ => ‘Wyoming’);

  6. Jay Harley Says:

    You truly rock my friend.

  7. Jay Harley Says:

    For a Flash CS3 / ActionScript / Flex combo box, I used the following:

    var stateData = new Array ( {data: ‘AK’, label: ‘Alaska’}, {data: ‘AL’, label: ‘Alabama’}, {data: ‘AR’, label: ‘Arkansas’}, {data: ‘AZ’, label: ‘Arizona’}, {data: ‘CA’, label: ‘California’}, {data: ‘CO’, label: ‘Colorado’}, {data: ‘CT’, label: ‘Connecticut’}, {data:
    ‘DE’, label: ‘Delaware’}, {data: ‘DC’, label: ‘District of Columbia’}, {data: ‘FL’, label: ‘Florida’}, {data: ‘GA’, label: ‘Georgia’}, {data: ‘HI’, label: ‘Hawaii’}, {data: ‘IA’, label: ‘Iowa’}, {data: ‘ID’, label: ‘Idaho’}, {data:
    ‘IL’, label: ‘Illinois’}, {data: ‘IN’, label: ‘Indiana’}, {data: ‘KS’, label: ‘Kansas’}, {data: ‘KY’, label: ‘Kentucky’}, {data: ‘LA’, label: ‘Louisiana’}, {data: ‘MA’, label: ‘Massachusetts’}, {data: ‘MD’, label: ‘Maryland’}, {data:
    ‘ME’, label: ‘Maine’}, {data: ‘MI’, label: ‘Michigan’}, {data: ‘MN’, label: ‘Minnesota’}, {data: ‘MS’, label: ‘Mississippi’}, {data: ‘MO’, label: ‘Missouri’}, {data: ‘MT’, label: ‘Montana’}, {data: ‘NC’, label: ‘North Carolina’}, {data:
    ‘ND’, label: ‘North Dakota’}, {data: ‘NE’, label: ‘Nebraska’}, {data: ‘NH’, label: ‘New Hampshire’}, {data: ‘NJ’, label: ‘New Jersey’}, {data: ‘NM’, label: ‘New Mexico’}, {data: ‘NV’, label: ‘Nevada’}, {data: ‘NY’, label:
    ‘New York’}, {data: ‘OH’, label: ‘Ohio’}, {data: ‘OK’, label: ‘Oklahoma’}, {data: ‘OR’, label: ‘Oregon’}, {data: ‘PA’, label: ‘Pennsylvania’}, {data: ‘RI’, label: ‘Rhode Island’}, {data: ‘SC’, label: ‘South Carolina’}, {data:
    ‘SD’, label: ‘South Dakota’}, {data: ‘TN’, label: ‘Tennessee’}, {data: ‘TX’, label: ‘Texas’}, {data: ‘UT’, label: ‘Utah’}, {data: ‘VA’, label: ‘Virginia’}, {data: ‘VT’, label: ‘Vermont’}, {data: ‘WA’, label: ‘Washington’}, {data:
    ‘WI’, label: ‘Wisconsin’}, {data: ‘WV’, label: ‘West Virginia’}, {data: ‘WY’, label: ‘Wyoming’} );

  8. Rich Paul Says:

    And here’s a simple flash actionscript object with the abbreviations as keys and the names as values (works well for javascript, too):

    var states:Object = {’AK’ : ‘Alaska’, ‘AL’ : ‘Alabama’, ‘AR’ : ‘Arkansas’, ‘AZ’ : ‘Arizona’, ‘CA’ : ‘California’, ‘CO’ : ‘Colorado’, ‘CT’ : ‘Connecticut’, ‘DE’ : ‘Delaware’, ‘DC’ : ‘District of Columbia’, ‘FL’ : ‘Florida’, ‘GA’ : ‘Georgia’, ‘HI’ : ‘Hawaii’, ‘IA’ : ‘Iowa’, ‘ID’ : ‘Idaho’, ‘IL’ : ‘Illinois’, ‘IN’ : ‘Indiana’, ‘KS’ : ‘Kansas’, ‘KY’ : ‘Kentucky’, ‘LA’ : ‘Louisiana’, ‘MA’ : ‘Massachusetts’, ‘MD’ : ‘Maryland’, ‘ME’ : ‘Maine’, ‘MI’ : ‘Michigan’, ‘MN’ : ‘Minnesota’, ‘MS’ : ‘Mississippi’, ‘MO’ : ‘Missouri’, ‘MT’ : ‘Montana’, ‘NC’ : ‘North Carolina’, ‘ND’ : ‘North Dakota’, ‘NE’ : ‘Nebraska’, ‘NH’ : ‘New Hampshire’, ‘NJ’ : ‘New Jersey’, ‘NM’ : ‘New Mexico’, ‘NV’ : ‘Nevada’, ‘NY’ : ‘New York’, ‘OH’ : ‘Ohio’, ‘OK’ : ‘Oklahoma’, ‘OR’ : ‘Oregon’, ‘PA’ : ‘Pennsylvania’, ‘RI’ : ‘Rhode Island’, ‘SC’ : ‘South Carolina’, ‘SD’ : ‘South Dakota’, ‘TN’ : ‘Tennessee’, ‘TX’ : ‘Texas’, ‘UT’ : ‘Utah’, ‘VA’ : ‘Virginia’, ‘VT’ : ‘Vermont’, ‘WA’ : ‘Washington’, ‘WI’ : ‘Wisconsin’, ‘WV’ : ‘West Virginia’, ‘WY’ : ‘Wyoming’};

  9. Bode Says:

    You guys are awesome! Thanks.

  10. Icommacruimig Says:

    I read some of the posts and I think it is a great blog. Are you interested in my details label I have a nice fresh joke for you people) Did you hear that NASA has launched several Holsteins into low earth orbit? It was the herd shot around the world.

Leave a Reply

Powered by WordPress