[jQuery] [OT] form input field value
I've got a text field (named searchParam) that onkeypress will trigger
a function that will extract the field's value using $
('#searchParam').val() and use that value to be used in a database
query. I've noticed that when I'm typing the value, the JS code is
one step behind. That is, if I've typed a string that says foobar,
the database is given the string fooba. If I've deleted the string to
say foo, the database is passed the string foob. Has anyone seen this
before and figured it out?
tia,
- Joe