I had a form element like this
<input type="text" value="" name="myid" id="id"/>
this input coming from database and there i no wy to add onblur evnt.
so i thought of using jquery blur event.
I need help in that when user enters his id like cf1234 of length six then onblur event hs to fire and check that id entered with database value.
if record foung in database i have to alert user id is valid and if not alert user with id not valid and stop form submit.
dO WE HaVE ANY EXAMPLE THAT HELPS.
Appreciate your help.
ITs not perfect, and probbly will need some twekaing ,,,, but its somthgin to start from
var formSubmitFlag = false;
// Function that is binded to the keyUp of the textbox
if(textValue.length == 6)
alert('6 carecters - ' + textValue);
// Do validation here ...
// You can use CFC with java script
// and if its validated change the formSubmitFlag = true so the form can be submited
formSubmitFlag = true;
// end if
// End function
// Form submit control
alert('Can not submit yet until the field is validated ...');
<cfform onsubmit="return checkFormSubmitFlag();" name="myForm">
<cfinput type="text" name="mytextbox" onKeyUp="onTextboxChange(this.value);">
<input type="submit" />
Europe, Middle East and Africa