Connecting Tech Pros Worldwide Forums | Help | Site Map

Predicitive input

Clive Moore
Guest
 
Posts: n/a
#1: Jul 23 '05
Is it possible to modify a HTML list box properties so that it doesn't
scroll to the letter pressed. I have created a bit of code to allow the
list box to scroll to the the first 5 characters entered. Ie if the
user selects the list box and types 'compu' the listbox will scroll to
'Computer'. My problem is with the default behaviour of the listbox.
After the 'computer' option is selected the listbox moves to a word
begining with 'u' my last entered character. Is there anyway arround
this? My code is executed on the keyup event on the listbox <select
size="5" multiple="true" id="b" onkeyup="DoSelect()">.


--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

kaeli
Guest
 
Posts: n/a
#2: Jul 23 '05

re: Predicitive input


In article <d9eca1c47ee0271877eb9a704813b196.35643@mygate.mai lgate.org>,
helloclive@hotmail.com enlightened us with...[color=blue]
> Is it possible to modify a HTML list box properties so that it doesn't
> scroll to the letter pressed. I have created a bit of code to allow the
> list box to scroll to the the first 5 characters entered. Ie if the
> user selects the list box and types 'compu' the listbox will scroll to
> 'Computer'. My problem is with the default behaviour of the listbox.
> After the 'computer' option is selected the listbox moves to a word
> begining with 'u' my last entered character. Is there anyway arround
> this? My code is executed on the keyup event on the listbox <select
> size="5" multiple="true" id="b" onkeyup="DoSelect()">.
>
>
>[/color]

I'm sure there is, but unless this is for an intranet application, it's
a Bad Idea to change the default behavior of a component. Usability
studies show that once we actually get people used to things, they
really don't like it when you change the behavior of that thing.
It's kind of like teaching someone to drive, then changing the gas pedal
to the left and the brake to the right. ;)

If you still want to do it, cancel the event according to the browser of
choice. Netscape and IE do it a bit differently.

--
--
~kaeli~
With her marriage, she got a new name and a dress.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

McKirahan
Guest
 
Posts: n/a
#3: Jul 23 '05

re: Predicitive input


"Clive Moore" <helloclive@hotmail.com> wrote in message
news:d9eca1c47ee0271877eb9a704813b196.35643@mygate .mailgate.org...[color=blue]
> Is it possible to modify a HTML list box properties so that it doesn't
> scroll to the letter pressed. I have created a bit of code to allow the
> list box to scroll to the the first 5 characters entered. Ie if the
> user selects the list box and types 'compu' the listbox will scroll to
> 'Computer'. My problem is with the default behaviour of the listbox.
> After the 'computer' option is selected the listbox moves to a word
> begining with 'u' my last entered character. Is there anyway arround
> this? My code is executed on the keyup event on the listbox <select
> size="5" multiple="true" id="b" onkeyup="DoSelect()">.
>
>
> --
> Posted via Mailgate.ORG Server - http://www.Mailgate.ORG[/color]

Here's something I found and adapted for my use:

// Cooking with JavaScript & DHTML
// Bonus Recipe: Typing select Element Choices in IE for Windows
// http://www.oreillynet.com/pub/a/java...nygoodman.html
// http://www.oreillynet.com/lpt/a/4135


Dennis Marks
Guest
 
Posts: n/a
#4: Jul 23 '05

re: Predicitive input


In article
<d9eca1c47ee0271877eb9a704813b196.35643@mygate.mai lgate.org>, Clive
Moore <helloclive@hotmail.com> wrote:
[color=blue]
> Is it possible to modify a HTML list box properties so that it doesn't
> scroll to the letter pressed. I have created a bit of code to allow the
> list box to scroll to the the first 5 characters entered. Ie if the
> user selects the list box and types 'compu' the listbox will scroll to
> 'Computer'. My problem is with the default behaviour of the listbox.
> After the 'computer' option is selected the listbox moves to a word
> begining with 'u' my last entered character. Is there anyway arround
> this? My code is executed on the keyup event on the listbox <select
> size="5" multiple="true" id="b" onkeyup="DoSelect()">.[/color]

Why not have a separate input box below the select list where you enter
the search term. Do the onkeyup="DoSelect() in the input box.

--
Dennis Marks
http://www.dcs-chico.com/~denmarks/
To reply change none to dcsi.


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Clive Moore
Guest
 
Posts: n/a
#5: Jul 23 '05

re: Predicitive input




Thanks for your reply. This is what ive been looking for.
Clive



--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Closed Thread