I have an input field where the user enters an id#. I am using Ajax to check the database for that user's id# and afterwards populate the other input fields with that person's information from the database.
I am trying to run a series of validation statements after the information is inserted via Ajax into the input fields, but I can't figure out which event I need to use.
I am trying to do something like this:
$(.formfields).dataInserted(function() {
if(costCenter == '') {
$("#cost_center").after('<div id="cost_center_error" class="error">Your cost center number is required.</div>');
hasError = true;
}
}
I can't use keyup or change or anything like that, since there the user doesn't actually manually enter the data. What jQuery event type is it when Ajax inserts data into an input field?