javascritpt to check if data exists before entering
I have a form that users fill out..
I want the first (user_ID)field to kick off a javascript that:
1. makes it upper case while typeing (this I have working):
onKeyUp="javascript:this.value=this.value.toUpperCase();"
2. runs a select statement to see if it exists in the table, if not goto next select, if it does exist goto page 2 which pulls it in for editing..
3. runs a select that errors if its not a valid ID..
I don't want the field on a page by itself that is submitted first.. (that would obviously be the easiest solution)
I've tried creating a hidden button, and submitting that button with javascript doSubmit(HIDDEN), but I can't seen to get the onKeyUp and onChange to work at the same time
and I don't want to query the database with every keystroke..