I am trying to Implement an New AutoComplete Control. I have an textbox $("#Code"). When the values has been selected from the table I am assigning the selected value using
$("#Code").val(selectedValue);
Since I have to check the validation for the same I am trying to get the change event of the text box $("#Code"). The same is firing when I keypress on the textbox but the change event not firing when I assign using $.val() function.
I have tried the following.
Entity="#Code"; //for example
$(Entity).keypress(function (event) {
firing on keypress.. // ok.. No Problem
});
$(Entity).keydown(function (event) {
firing on keydown.. // ok.. No Problem
});
$(Entity).bind('input',function() {
firing on keypress.. // ok.. No Problem
});
$(Entity).change(function (event) {
firing on keypress.. // ok.. No Problem
});
Could anyone please help how to detect the event of val()?
You can call change method explicitly
Thanks