"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message news:<#dpTEBpMEHA.1644@TK2MSFTNGP09.phx.gbl>...[color=blue]
> Ben wrote:[color=green]
> > 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?
> >[/color]
>
> This is not an asp issue (you would have the same problem if you put the
> control on a non-asp page would you not?). Please follow up in a client-side
> scripting newsgroup such as one of the ones with "dhtml" and "scripting" in
> their names, or the m.p.scripting.jscript newsgroup.
>
> I have created a demo illustrating one way to do this at
>
http://www.thrasherwebdesign.com/ind...asp&c=&a=clear
>
> Bob Barrows[/color]
Thanks for the pointer as well as the example. I'll try some other groups.
Regards,
Ben