B
Ben
I've got an asp page that populates a listbox with info from a db.
The list box ends up being pretty big, so I want to be able to search
it effectively. I like the method wherein the user types the letters
of the word they are looking for from within the listbox and the
control automatically scrolls to the item matching the chars they have
typed thus far.
Example:
If the listbox were to contain states Alabama, Alaska, and Louisiana,
when the user clicked in the listbox and typed "Ala" the box would
scroll to Alabama, and when they typed an additional 's', so the typed
string was "Alas", the box would scroll to Alaska.
Problem:
I've got javascript that does this very well, but the listbox control
default search behavior overrides my javascript. So, the javascript
will correctly index to Alaska when "Alas" is typed, but when the
javascript function is done running, the list moves down to Louisiana,
because the asp control thinks that by typing 'l' the user wants to
move to the first item in the box beginning with an 'l'.
Question:
Can I disable the default search behavior in the control? If so, how?
If not, does anyone have any thoughts on how else I might get around
this problem?
Thanks and regards,
Ben
The list box ends up being pretty big, so I want to be able to search
it effectively. I like the method wherein the user types the letters
of the word they are looking for from within the listbox and the
control automatically scrolls to the item matching the chars they have
typed thus far.
Example:
If the listbox were to contain states Alabama, Alaska, and Louisiana,
when the user clicked in the listbox and typed "Ala" the box would
scroll to Alabama, and when they typed an additional 's', so the typed
string was "Alas", the box would scroll to Alaska.
Problem:
I've got javascript that does this very well, but the listbox control
default search behavior overrides my javascript. So, the javascript
will correctly index to Alaska when "Alas" is typed, but when the
javascript function is done running, the list moves down to Louisiana,
because the asp control thinks that by typing 'l' the user wants to
move to the first item in the box beginning with an 'l'.
Question:
Can I disable the default search behavior in the control? If so, how?
If not, does anyone have any thoughts on how else I might get around
this problem?
Thanks and regards,
Ben