Re: question about javascript and textboxes for Pros
by David Mintz <mambomintz(at)yahoo.com>
|
Date: |
Tue, 9 Jan 2001 20:08:01 -0800 (PST) |
To: |
hwg-languages(at)hwg.org |
|
todo: View
Thread,
Original
|
|
--- Siim Einfeldt aka Itpunk <siim_e(at)pshg.edu.ee>
wrote:
>
>
> one problem solved:-) ok, I can now type f, but
> what if I wanted to
> write fe (f and e) or even feb (f and e and b)?
>
Ah, now that's trickier! Go ask Cyanide (-:
But if you ask me, well, AFAIK, if would wanted to
approximate that kind of behavior I think you'd have
to have a separate textbox, and prompt the user to
type the first 2 (or 3, or 4) characters of the
item/number and click something, which would trigger a
function that would loop through your OPTIONS array
comparing strings, and set the matching element of the
options array's SELECTED attrib to true when it hits a
match, and then exit the loop. And give them a
window.alert message saying "sorry, we ain't got that"
if you get to the end without finding a match.
Like a totally client-side database, in a way.
Interesting!
Maybe more work than it's worth for the user, or maybe
not, if there are that many options in the select
menu.
Let me know if you need a code example.
David
David Mintz
Spanish Interpreter, US District Court
Southern District of New York
Web Design & Hosting http://dmintzweb.com/
Personal http://panix.com/~dmintz/
__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA