Trigger the change event of a textbox in jQuery
<p>I have an asp:TextBox with asp:RegularExpressionValidator to validate if it's a number. Obviously an onchange event will be attached to this textbox while rendering. Also I add a change event at $(document).ready to make some calculation when the value is changed.</p>

<pre><code>&lt;asp:TextBox id="myText" runat="server" /&gt;
&lt;asp:regularexpressionvalidator id="myRev" ControlToValidate="myText" runat="server"&gt;*&lt;/asp:regularexpressionvalidator&gt;

$(document).ready(function(){
    $('[id$=myText]').bind('change',function(){
           //do something
    }).change();      //force the change event at the very beginning
});
</code></pre>

<p>My function will be executed later than the .net generated js because of the register time. But the asp.net js throws an error. I traced in the js:</p>

<pre><code>   function ValidatorOnChange(event) {
       ...
   }
</code></pre>

<p>and found that all of event.fromElement,event.toElement,event.srcElement are null which causes the exception. Did I do something wrong? Any solutions? Thanks.</p>

<p><strong>EDIT</strong></p>

<p>It's proved to be a MS bug, working fine in ASP.NET 4 vs2010.</p>
