469,923 Members | 1,282 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,923 developers. It's quick & easy.

Predicitive input

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
Jul 23 '05 #1
4 1082
In article <d9************************************@mygate.mai lgate.org>,
he********@hotmail.com enlightened us with...
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()">.


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

Jul 23 '05 #2
"Clive Moore" <he********@hotmail.com> wrote in message
news:d9************************************@mygate .mailgate.org...
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


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
Jul 23 '05 #3
In article
<d9************************************@mygate.mai lgate.org>, Clive
Moore <he********@hotmail.com> wrote:
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()">.


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! =-----
Jul 23 '05 #4


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

--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by SophistiCat | last post: by
2 posts views Thread by Cranky | last post: by
1 post views Thread by tcertain | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.