Welcome! Log In Create A New Profile

Advanced

Drop down box with States

Posted by Joel 
Joel
Drop down box with States
October 24, 2008 10:31AM
Hi -

Not sure of best way to do this - I want a combo box with the U.S. State abbreviations in it. I can think of several ways to do it, the most straight forward of which is to create a table and put them in there and then have the combo reference the table. Is there a better way out there?

If the table is the way to go, being lazy smiling smiley, I figured I'd just go on the 'Net and find an excel spreadsheet already populated with the data I needed, but then didn't know if there was a way in WebDev to import that data into the table - is there a way to do that? I'm sure the need will come up again.

Thanks!
pat.pcs.crosspost
Re: Drop down box with States
October 24, 2008 12:38PM
Hi,

So many ways to do it ! You can access an XLS file directly in WebDev with the XLS functions. You may also go to a site where such a combo is displayed and look at the page source. After that, it's quite easy to get the data.

--
pat
[ilikewd.free.fr]

ps. I tried and get that
"AL",Alabama
"AK",Alaska
"AB",Alberta
"AS",American Samoa
"AZ",Arizona
"AR",Arkansas
"BC",British Columbia
"CA",California
"CO",Colorado
"CT",Connecticut
"DE",Delaware
"DC",District of Columbia
"FL",Florida
"GA",Georgia
"GU",Guam
"HI",Hawaii
"ID",Idaho
"IL",Illinois
"IN",Indiana
"IA",Iowa
"KS",Kansas
"KY",Kentucky
"LA",Louisiana
"ME",Maine
"MB",Manitoba
"MH",Marshall Islands
"MD",Maryland
"MA",Massachusetts
"MI",Michigan
"MN",Minnesota
"MS",Mississippi
"MO",Missouri
"MT",Montana
"NE",Nebraska
"NV",Nevada
"NB",New Brunswick
"NH",New Hampshire
"NJ",New Jersey
"NM",New Mexico
"NY",New York
"NF",Newfoundland
"NC",North Carolina
"ND",North Dakota
"MP",Northern Mariana Islands
"NT",Northwest Territories
"NS",Nova Scotia
"NU",Nunavut
"OH",Ohio
"OK",Oklahoma
"ON",Ontario
"OR",Oregon
"PW",Palau
"PA",Pennsylvania
"PE",Prince Edward Island
"PR",Puerto Rico
"QC",Quebec
"RI",Rhode Island
"SK",Saskatchewan
"SC",South Carolina
"SD",South Dakota
"TN",Tennessee
"TX",Texas
"UT",Utah
"VT",Vermont
"VA",Virginia
"VI",U.S. Virgin Islands
"WA",Washington
"WV",West Virginia
"WI",Wisconsin
"WY",Wyoming
"YT",Yukon Territory





Message forwarded from pcsoft.us.windev
Fabrice Harari
Re: Re: Drop down box with States
October 24, 2008 01:59PM
Hi Joel...

Now that you have a CR delimited string, you can just do:
MyCombo=MyStateString...

Best regards

Fabrice Harari
WinDev, WebDev, WinDev Mobile consulting
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: