how to find the textbox value changed by setting val() function?
<p>I am trying to Implement an <strong>New AutoComplete Control</strong>. I have an textbox <code>$("#Code")</code>. When the values has been selected from the table I am assigning the selected value using </p>

<pre><code>$("#Code").val(selectedValue); 
</code></pre>

<p>Since I have to check the validation for the same I am trying to get the change event of the text box <code>$("#Code")</code>. The same is firing when I keypress on the textbox but the change event not firing when I assign using <code>$.val()</code> function.</p>

<p>I have tried the following.</p>

<pre><code>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
 });
</code></pre>

<p>Could anyone please help how to detect the event of <code>val()</code>?</p>
