Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #10581 > unrolled thread
| Started by | "Mel Smith" <med_cutout_syntel@aol.com> |
|---|---|
| First post | 2012-01-25 13:46 -0700 |
| Last post | 2012-01-29 09:39 -0700 |
| Articles | 18 — 6 participants |
Back to article view | Back to comp.lang.javascript
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
| From | "Mel Smith" <med_cutout_syntel@aol.com> |
|---|---|
| Date | 2012-01-25 13:46 -0700 |
| Subject | Perhaps OT ? |
| Message-ID | <9ob81lFcijU1@mid.individual.net> |
Hi:
I have a (series of 4) 2-char input field(s) (vertically oriented in a
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.
I have, of course, a concordance file with all the correct names and
region abbreviations.
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 ?
I don't know how to configure the <Select > tag for this operation. My
head is aching here :(
Thanks for a kick in the pants on this one !
--
Mel Smith
[toc] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2012-01-25 16:19 -0800 |
| Message-ID | <8905a920-b217-4566-b7c3-61ef20468913@m11g2000yqe.googlegroups.com> |
| In reply to | #10581 |
On Jan 25, 2:46 pm, "Mel Smith" <med_cutout_syn...@aol.com> wrote:
> Hi:
>
> I have a (series of 4) 2-char input field(s) (vertically oriented in a
> 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."
> 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
> 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.
> 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,
just simply populate the element as such:
<select ...>
<option value="AB">Alabama</select>
...
</select>
If not, you'll need a way to determine Country before offering the
ability to choose from the list.
[toc] | [prev] | [next] | [standalone]
| From | "Mel Smith" <med_cutout_syntel@aol.com> |
|---|---|
| Date | 2012-01-25 18:53 -0700 |
| Message-ID | <9obq17FbniU1@mid.individual.net> |
| In reply to | #10586 |
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
[toc] | [prev] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2012-01-25 19:09 -0800 |
| Message-ID | <771c20c2-2de9-46fd-8c08-00b4e79f081f@y10g2000vbn.googlegroups.com> |
| In reply to | #10589 |
On Jan 25, 7:53 pm, "Mel Smith" <med_cutout_syn...@aol.com> wrote: > So, in essence, I want my user to see in the dropdown list 'AL - Alabama', > then clicking on it I want returned 'AL' So something like this? <https://gist.github.com/1680706>
[toc] | [prev] | [next] | [standalone]
| From | "Mel Smith" <med_cutout_syntel@aol.com> |
|---|---|
| Date | 2012-01-26 08:39 -0700 |
| Message-ID | <9odadeFpsmU1@mid.individual.net> |
| In reply to | #10590 |
Michael said: > So, in essence, I want my user to see in the dropdown list 'AL - Alabama', > then clicking on it I want returned 'AL' So something like this? <https://gist.github.com/1680706> Michael: I'll try that today- I think it will do the trick ! So, I've downloaded it, and will digest thoroughly during tghe day, and fit it in to my page. Thank you ! -Mel Smith Mesa, AZ- Arizona :))
[toc] | [prev] | [next] | [standalone]
| From | "Mel Smith" <med_cutout_syntel@aol.com> |
|---|---|
| Date | 2012-01-27 14:58 -0700 |
| Message-ID | <9ogl0eF7b7U1@mid.individual.net> |
| In reply to | #10605 |
Hi:
I transferred my problem page to one of my older unused web sites, and
massaged the page to hide real names & addresses, and stop submission, and
to show my crowded Region fields (Rgn) near the top right of this sole page.
You may wish to look and comment. I'll be working on it again tomorrow.
So, if you wish, please visit: www.whosaway.com and enter the
password: 'LOTEDIT' to see the problem page.
Thanks,
-Mel Smith
[toc] | [prev] | [next] | [standalone]
| From | Jeff North <jnorthau@yahoo.com.au> |
|---|---|
| Date | 2012-01-28 16:38 +1100 |
| Message-ID | <9c27i71nek309v8qbfstqcjpmn3m887n79@4ax.com> |
| In reply to | #10656 |
On Fri, 27 Jan 2012 14:58:34 -0700, in comp.lang.javascript "Mel Smith" <med_cutout_syntel@aol.com> <9ogl0eF7b7U1@mid.individual.net> wrote: >| Hi: >| >| I transferred my problem page to one of my older unused web sites, and >| massaged the page to hide real names & addresses, and stop submission, and >| to show my crowded Region fields (Rgn) near the top right of this sole page. >| >| You may wish to look and comment. I'll be working on it again tomorrow. >| >| So, if you wish, please visit: www.whosaway.com and enter the >| password: 'LOTEDIT' to see the problem page. >| >| Thanks, >| >| -Mel Smith >| You're probably wanting something like: http://jeffnorth.com/newsgroup/select_items.html The boxs 1-6 show the possible configurations for the select control. The textboxs with the click hyperlink is probably what you are looking for.
[toc] | [prev] | [next] | [standalone]
| From | "Mel Smith" <med_cutout_syntel@aol.com> |
|---|---|
| Date | 2012-01-28 08:38 -0700 |
| Message-ID | <9oij4aFkshU1@mid.individual.net> |
| In reply to | #10662 |
Jeff said:
> You're probably wanting something like:
> http://jeffnorth.com/newsgroup/select_items.html
>
> The boxs 1-6 show the possible configurations for the select control.
> The textboxs with the click hyperlink is probably what you are looking
> for.
Jeff:
Thanks for the link, I'll check it out today.
-Mel
[toc] | [prev] | [next] | [standalone]
| From | "Mel Smith" <med_cutout_syntel@aol.com> |
|---|---|
| Date | 2012-01-28 16:28 -0700 |
| Message-ID | <9ojelsF953U1@mid.individual.net> |
| In reply to | #10662 |
Hi Jeff:
Thanks for trying to help. I've got good ideas from your web site, and
the example page.
However, I'm not sophisticated enough to understand (completely) your
page, or to strip out the code that I could use in my own unique situation.
So, I'll plug on with your example and 'popups' in mind, and try to use as
much of your code as I can.
btw, your example *does* work on Firefox and Chrome but not on my old
IE 7. I *do* use IE7 on my dev machine, then do final tests on Chrome,
Safari, and FF.
Anyway, thanks for your help. I do see a path forward using popups for
the State/Prov selection process
-Mel Smith
[toc] | [prev] | [next] | [standalone]
| From | Jeff North <jnorthau@yahoo.com.au> |
|---|---|
| Date | 2012-01-29 11:27 +1100 |
| Message-ID | <7229i7hp8dn6e6n0tk30pbmt3bvm7irvjv@4ax.com> |
| In reply to | #10691 |
On Sat, 28 Jan 2012 16:28:55 -0700, in comp.lang.javascript "Mel Smith" <med_cutout_syntel@aol.com> <9ojelsF953U1@mid.individual.net> wrote: >| Hi Jeff: >| >| Thanks for trying to help. I've got good ideas from your web site, and >| the example page. >| >| However, I'm not sophisticated enough to understand (completely) your >| page, or to strip out the code that I could use in my own unique situation. >| So, I'll plug on with your example and 'popups' in mind, and try to use as >| much of your code as I can. >| >| btw, your example *does* work on Firefox and Chrome but not on my old >| IE 7. I *do* use IE7 on my dev machine, then do final tests on Chrome, >| Safari, and FF. It's the 'obj.previousElementSibling.name' that is causing the problem - only works in IE9. I've put up a revised version with lots of comments so that you may follow along. http://jeffnorth.com/newsgroup/select_items_2.html I can't test this as I only have IE9 but it should work in all browsers. >| Anyway, thanks for your help. I do see a path forward using popups for >| the State/Prov selection process >| >| -Mel Smith >|
[toc] | [prev] | [next] | [standalone]
| From | "Mel Smith" <med_cutout_syntel@aol.com> |
|---|---|
| Date | 2012-01-29 09:26 -0700 |
| Message-ID | <9ola9vFi6nU1@mid.individual.net> |
| In reply to | #10696 |
Jeff said:
> It's the 'obj.previousElementSibling.name' that is causing the problem
> - only works in IE9.
>
> I've put up a revised version with lots of comments so that you may
> follow along. http://jeffnorth.com/newsgroup/select_items_2.html
>
> I can't test this as I only have IE9 but it should work in all
> browsers.
HI Jeff:
I'll download and try again late today and tomorrow.
Thanks for helping !
-Mel Smith
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2012-01-25 15:43 -0800 |
| Message-ID | <0n41i7doh8v0e053hk0ihpbj3b55ga64am@4ax.com> |
| In reply to | #10581 |
On Wed, 25 Jan 2012 13:46:45 -0700, "Mel Smith"
<med_cutout_syntel@aol.com> wrote:
>Hi:
>
> I have a (series of 4) 2-char input field(s) (vertically oriented in a
>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.
>
> I have, of course, a concordance file with all the correct names and
>region abbreviations.
>
>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 ?
>
> I don't know how to configure the <Select > tag for this operation. My
>head is aching here :(
From http://www.w3schools.com/tags/att_option_value.asp :
<select>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
adjusted to
<option value="WA">Washington</option>
>Thanks for a kick in the pants on this one !
You are welcome. My answer seems so obvious that I am concerned
that I missed the point. Did I answer you correctly?
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | "Mel Smith" <med_cutout_syntel@aol.com> |
|---|---|
| Date | 2012-01-26 14:25 -0700 |
| Message-ID | <9odumfFp7iU1@mid.individual.net> |
| In reply to | #10609 |
Gene said:
> From http://www.w3schools.com/tags/att_option_value.asp :
>
> <select>
> <option value="volvo">Volvo</option>
> <option value="saab">Saab</option>
> <option value="mercedes">Mercedes</option>
> <option value="audi">Audi</option>
> </select>
>
> adjusted to
>
> <option value="WA">Washington</option>
>
>>Thanks for a kick in the pants on this one !
>
> You are welcome. My answer seems so obvious that I am concerned
> that I missed the point. Did I answer you correctly?
Hi Gene:
Yes, I think you may have missed that I wanted the 2-char 'WA' returned,
and not the word 'Washington' displayed on the screen after selection. I
have a 2-char field for 'region' and I'm crowded left and right and up and
down for landscape room
But,. Michael Haufe has given me some sample code to look at and chew
on, and now my head is 'abuzz' with more new ideas about this 'crowding'
problem
Thanks for the response !
-Mel
[toc] | [prev] | [next] | [standalone]
| From | Tim Streater <timstreater@greenbee.net> |
|---|---|
| Date | 2012-01-26 21:50 +0000 |
| Message-ID | <timstreater-9FC8A9.21502726012012@news.individual.net> |
| In reply to | #10612 |
In article <9odumfFp7iU1@mid.individual.net>, "Mel Smith" <med_cutout_syntel@aol.com> wrote: > Gene said: > > > From http://www.w3schools.com/tags/att_option_value.asp : > > > > <select> > > <option value="volvo">Volvo</option> > > <option value="saab">Saab</option> > > <option value="mercedes">Mercedes</option> > > <option value="audi">Audi</option> > > </select> > > > > adjusted to > > > > <option value="WA">Washington</option> > > > >>Thanks for a kick in the pants on this one ! > > > > You are welcome. My answer seems so obvious that I am concerned > > that I missed the point. Did I answer you correctly? > > > Hi Gene: > > Yes, I think you may have missed that I wanted the 2-char 'WA' returned, > and not the word 'Washington' displayed on the screen after selection. "WA" *is* what you'd have returned. -- Tim "That excessive bail ought not to be required, nor excessive fines imposed, nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
[toc] | [prev] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2012-01-26 16:05 -0800 |
| Message-ID | <2ff290f8-a6e0-4457-a682-c1942f4fcc79@k10g2000yqk.googlegroups.com> |
| In reply to | #10613 |
On Jan 26, 3:50 pm, Tim Streater <timstrea...@greenbee.net> wrote: > "WA" *is* what you'd have returned. I believe what he wants is a size="2" combobox with options listed with full names, which is emulated by what I posted (more or less given styling differences per browser).
[toc] | [prev] | [next] | [standalone]
| From | "Mel Smith" <med_cutout_syntel@aol.com> |
|---|---|
| Date | 2012-01-27 08:21 -0700 |
| Message-ID | <9oftopFihaU1@mid.individual.net> |
| In reply to | #10617 |
I believe what he wants is a size="2" combobox with options listed
with full names, which is emulated by what I posted (more or less
given styling differences per browser).
Yes, that is what I want. But, since I need 4 of these <select>
comboboxes underneath each other in a vertical column, I need to think of
some efficient means of just using one set of select options (i.e., fifty
U.S. States, and ten provinces.)
Now, I'm beginning to think, that I should leave the four 2-char <text>
fields in place, and when focus is on any of them, I should have some way
for the user to activate a 'click' event to bring up a single <select>
element and its 60-odd options. Hmmmm ...
Again, Michael has given me a solution, but I'm still puzzling over how
to make it more efficient and less obtrusive.
btw, I think I might place my page on one of my web sites for you folks
to look at to give you a better perspective.
Going golfing now -- but thinking about this :)))
Thank y'all.
-Mel Smith
[toc] | [prev] | [next] | [standalone]
| From | Dr J R Stockton <reply1204@merlyn.demon.co.uk> |
|---|---|
| Date | 2012-01-28 19:09 +0000 |
| Message-ID | <m3TWEKFTfEJPFwpe@invalid.uk.co.demon.merlyn.invalid> |
| In reply to | #10645 |
In comp.lang.javascript message <9oftopFihaU1@mid.individual.net>, Fri, 27 Jan 2012 08:21:57, Mel Smith <med_cutout_syntel@aol.com> posted: > Yes, that is what I want. But, since I need 4 of these <select> >comboboxes underneath each other in a vertical column, I need to think of >some efficient means of just using one set of select options (i.e., fifty >U.S. States, and ten provinces.) > If you can assume that the user has a working keyboard, why not put in the column four <input type=text value="??" size=3 ...> (size 3 to show the typist that there are only two letters), and, onChange or otherwise, look up the entries in a 60-entry table. If any fail to match, then pop up a small window in which the selection may be made by full name, perhaps by 61 radiobuttons, all initially clear - 50 States, 10 Provinces, and "none of those". BTW, are you disenfranchising those of Puerto Rico, Guam, US Samoa, etc.; and those of St Pierre & Miquelon etc.? -- (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05. Website <http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms PAS EXE etc. : <http://www.merlyn.demon.co.uk/programs/> - see in 00index.htm Dates - miscdate.htm estrdate.htm js-dates.htm pas-time.htm critdate.htm etc.
[toc] | [prev] | [next] | [standalone]
| From | "Mel Smith" <med_cutout_syntel@aol.com> |
|---|---|
| Date | 2012-01-29 09:39 -0700 |
| Message-ID | <9olb1nFo5oU1@mid.individual.net> |
| In reply to | #10694 |
Dr J said:
> If you can assume that the user has a working keyboard, why not put
> in the column four <input type=text value="??" size=3 ...> (size 3 to
> show the typist that there are only two letters), and, onChange or
> otherwise, look up the entries in a 60-entry table. If any fail to
> match, then pop up a small window in which the selection may be made by
> full name, perhaps by 61 radiobuttons, all initially clear - 50 States,
> 10 Provinces, and "none of those".
>
Yes, those fields are already there in that restricted horizontal space,
and I would like to continue to use them with an added
'verification/selection' process.
Your thoughts/suggestions and those examples of Jeff North will help me
to resolve this issue (and I hope without getting bogged down too deeply)
Have you visited the site and looked at the current work. I'd hate to
change the whole thing, but would like to add a bit of help.
> BTW, are you disenfranchising those of Puerto Rico, Guam, US Samoa,
> etc.; and those of St Pierre & Miquelon etc.?
The last I heard was the St. Pierre and Miquelon were a part of France, and
our Senior Park is used only by 'freezing' Canadians and Americans, and
those hardy permanent residents who 'fry' here at 115 degrees F during the
summer.
Thanks for the suggestions !
-Mel
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web