Well nevermind. It didn't hit me to that I can use both events and put the filter in on an the logic to enable/disable the select in the other event. D'OH! Sorry for the post.
P- On Jul 14, 3:44 pm, Paul Menard <[EMAIL PROTECTED]> wrote: > Hey all. Having a little trouble getting this to work. > > I have a donation form with an input (type="text") field and a select > dropdown item. By default the dropdown is disabled. The plan is when > the value of the input is 50 or higher enable the the select dropdown. > I also want to filter out keystrokes not between 0 and 9. In other > words numeric only. > > So my first implementation used the keypress event on the input field. > I can get the entered character but when I attempt to get the FULL > value of the input field it's prior to the new keystroke being > applied. For example is the input already has a value of '23' and the > user keys in '6' the value of the input is still '23' which in the > keypress function. Based on my return true the new keystroke value i > applied. > > So my second implementation I changed to using the keyup event. This > allows me to get at the full value of the input field but now I'm > having trouble filtering input chars. Seems with the keyup the value > of the new char entered is applied to the input value display already. > Which is too late to filter on. So returning false does no good. > > So any thoughts on the best way to tackle this? > > You can see a working version herehttp://wp7.byloudlogic.com/tip-jar/ > > Thanks in advance. > P-

