title: OnClick Event not Firing
body: <p>I've created a very simple test page to replicate a problem I'm having within my application.Sorry if this looks long winded for something so trivial.</p>
  
  <p>The .aspx page </p>
  
  <pre><code>&lt;body&gt;
  &lt;form id="form1" runat="server"&gt;
      &lt;asp:TextBox ID="tb" runat="server"&gt;&lt;/asp:TextBox&gt;
      &lt;asp:Button ID="btnOk" runat="server" text="OK" Width="60px"  UseSubmitBehavior="true" OnClientClick="saveAmendments();" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p></p>
  
  <p>In the page_load in the code behind I add an onchange attribute to the textbox</p>
  
  <pre><code>if (!IsPostBack)
      {
          tb.Attributes.Add("onchange", "addSaveDetails('abc###123###456###test###abc###');");
      }
  }
  </code></pre>
  
  <p>Which gets rendered as follows</p>
  
  <pre><code>&lt;body&gt;
      &lt;form name="form1" method="post" action="TestJP.aspx" id="form1"&gt;
      &lt;div&gt;
          &lt;input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUi3er8ht8oaCZzy2..." /&gt;
      &lt;/div&gt;
  
      &lt;div&gt;
         &lt;input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAwKOoa..." /&gt;
      &lt;/div&gt;
  
      &lt;input name="tb" type="text" value="testtt" id="tb" onchange="addSaveDetails('abc###123###456###test###abc###');" /&gt;
      &lt;input type="submit" name="btnOk" value="OK" onclick="saveAmendments();" id="btnOk" style="width:60px;" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p></p>
  
  <p>So if i change the value in the text box and click somwhere else on the screen the AddSaveDetails function fires. Then click on the button and the saveAmendments fires. However if you change the text and then click immediately on the button (rather than somewhere else on the screen first) and only the first (onchange) function fires. The onClick event never does. The js being called does nothing other than an alert. What could be stopping the event bubbling up to the last call?</p>