clkgtr
07-11-2003, 02:34 PM
I'm trying to create a searchable list box with an input box and a multiline select element similar to the one the guy here
http://forums.webdeveloper.com/showthread.php?threadid=12762
is trying to create. I don't want the user to have to click a process button though. So, I am using the onkeypress event to process my search. The problem is that my custom handler gets processed before the default handler and the captured key isn't appended to inputbox.value.
For example, if my list consists of:
cab
cat
cattle
and the user types 'catt' into the input box, 'cat' gets selected instead of 'cattle'. Is there a way to invoke the default handler and return control to my function?
If I have to, I can manually append the captured key to inputbox.value but I'd rather not. I'm not sure if all browsers process the onkeypress event in the same order.
Any help would be greatly appreciated.
Michael
http://forums.webdeveloper.com/showthread.php?threadid=12762
is trying to create. I don't want the user to have to click a process button though. So, I am using the onkeypress event to process my search. The problem is that my custom handler gets processed before the default handler and the captured key isn't appended to inputbox.value.
For example, if my list consists of:
cab
cat
cattle
and the user types 'catt' into the input box, 'cat' gets selected instead of 'cattle'. Is there a way to invoke the default handler and return control to my function?
If I have to, I can manually append the captured key to inputbox.value but I'd rather not. I'm not sure if all browsers process the onkeypress event in the same order.
Any help would be greatly appreciated.
Michael