Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #10589

Re: Perhaps OT ?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news-peer.in.tum.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From "Mel Smith" <med_cutout_syntel@aol.com>
Newsgroups comp.lang.javascript
Subject Re: Perhaps OT ?
Date Wed, 25 Jan 2012 18:53:40 -0700
Lines 97
Message-ID <9obq17FbniU1@mid.individual.net> (permalink)
References <9ob81lFcijU1@mid.individual.net> <8905a920-b217-4566-b7c3-61ef20468913@m11g2000yqe.googlegroups.com>
X-Trace individual.net ER7BcLlRjDSEPck1FkQ3YQ9/ONaSMmyArR9amo2boj6ggaGpP1
Cancel-Lock sha1:EEDtlUd8u+pHJggkh2q503kvlgs=
X-Priority 3
X-MSMail-Priority Normal
X-Newsreader Microsoft Outlook Express 6.00.2900.5931
X-RFC2646 Format=Flowed; Original
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.6157
Xref x330-a1.tempe.blueboxinc.net comp.lang.javascript:10589

Show key headers only | View raw


Michael said:

> crowded part of my screen) in which the user will input a U.S. State
> Abbreviation (e.g., AZ for Arizona), or a Canadian province (e.g., AB for
> Alberta), OR, click a key to return this correct abbreviation.

So what do the other mentioned fields do? Are they relevant at all?

what do you mean by "click a key to return this correct abbreviation."

Hi Michael:

    I (currently) have a 2-char input text field where the user will enter a 
U.S State Abbreviation or Canadian Province 2-char abbreviation.  There are 
four of these fields stacked vertically in a <td> column.  The other fields 
in neighboring columns are all Name/Street/Zip-PostCode/Contact info 
related on each of the four lines of the table.

    The problem is that the user will 'know' the name of the state (usually) 
(from a hand-written form ), but *may not* know the region *abbreviation* or 
may mis-spell it.

    So, I would like to change this 2-char <input type="text"> field to a 
<select> field where the user can either (confidently) type in the 2-char 
fields, or 'click' on something to show all the various states and 
provinces, and them let her 'select' one.  Then, I want to return *only* the 
correct 2-char abbreviation.

> I have, of course, a concordance file with all the correct names and
> region abbreviations.

Why use a 2 character field at all then? A select box seems
appropriate

    Because my Database has a 2-char region field,  The line is already very 
crowded (see below), and I want a 2-char state/province abbreviation

> But, my problem:
>
> If my user knows that the input U.S. State name should be the correct
> abbreviation for (say) Minnesota, but does not know the abbreviation 
> itself
> (i.e., MN), how can I show the user a drop-down list of States & 
> Provinces,
> from which the return value will always be the proper abbreviation, and
> *not* the full State name ?

If you have a dropdown list, why can't they just type the letter "M"
and see the corresponding values? I quite confident that all major
browsers since the late 1990's have this feature.

    She may not know *what* char to type or may make a mistake.  If she is 
confused, I want a clickable 2-char dropdown field that will show for 
example:

        AB - Alberta
        AL - Alabama
        MN - Minnesota
        etc,
        etc,

    Then when she 'clicks on the 'AL - Alabame' option, *only*  AL is 
returned.

> I don't know how to configure the <Select > tag for this operation. My
> head is aching here :(

>>Since I am American, I am a bit skeptical that other countries exist.
>>As a result you'll have to help me with my ignorance/laziness on this
>>fact:
>>between States and Provinces, are the abbreviations unique? If so,
j>>ust simply populate the element as such:


    Yes, the Canadian provinces *are* unique, and my concordance table has 
both states and provinces, with the provinces at the bottom of the <select> 
option list along with a disabled 'Canada' line as a separator between the 
states and the provinces!


<select ...>
    <option value="AB">Alabama</select>
    ...
</select>

    But, then *Alabama* is returned NOT my required 'AL'   (not AB which is 
Alberta, in Canada)

So, in essence, I want my user to see in the dropdown list 'AL - Alabama', 
then clicking on it I want returned 'AL'

Thanks for your response !

-Mel Smith
 

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Perhaps OT ? "Mel Smith" <med_cutout_syntel@aol.com> - 2012-01-25 13:46 -0700
  Re: Perhaps OT ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-25 16:19 -0800
    Re: Perhaps OT ? "Mel Smith" <med_cutout_syntel@aol.com> - 2012-01-25 18:53 -0700
      Re: Perhaps OT ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-25 19:09 -0800
        Re: Perhaps OT ? "Mel Smith" <med_cutout_syntel@aol.com> - 2012-01-26 08:39 -0700
          Re: Perhaps OT ? "Mel Smith" <med_cutout_syntel@aol.com> - 2012-01-27 14:58 -0700
            Re: Perhaps OT ? Jeff North <jnorthau@yahoo.com.au> - 2012-01-28 16:38 +1100
              Re: Perhaps OT ? "Mel Smith" <med_cutout_syntel@aol.com> - 2012-01-28 08:38 -0700
              Re: Perhaps OT ? "Mel Smith" <med_cutout_syntel@aol.com> - 2012-01-28 16:28 -0700
                Re: Perhaps OT ? Jeff North <jnorthau@yahoo.com.au> - 2012-01-29 11:27 +1100
                Re: Perhaps OT ? "Mel Smith" <med_cutout_syntel@aol.com> - 2012-01-29 09:26 -0700
  Re: Perhaps OT ? Gene Wirchenko <genew@ocis.net> - 2012-01-25 15:43 -0800
    Re: Perhaps OT ? "Mel Smith" <med_cutout_syntel@aol.com> - 2012-01-26 14:25 -0700
      Re: Perhaps OT ? Tim Streater <timstreater@greenbee.net> - 2012-01-26 21:50 +0000
        Re: Perhaps OT ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-26 16:05 -0800
          Re: Perhaps OT ? "Mel Smith" <med_cutout_syntel@aol.com> - 2012-01-27 08:21 -0700
            Re: Perhaps OT ? Dr J R Stockton <reply1204@merlyn.demon.co.uk> - 2012-01-28 19:09 +0000
              Re: Perhaps OT ? "Mel Smith" <med_cutout_syntel@aol.com> - 2012-01-29 09:39 -0700

csiph-web