title: textbox change event - jquery
body: <p>I have a textbox control, the script is</p>
  
  <pre><code>&lt;asp:TextBox ID="txtDate" EnableTheming="false" CssClass="calender" 
                          runat="server" ClientIDMode="Static"&gt;&lt;/asp:TextBox&gt;
  </code></pre>
  
  <p>in the calender control if I select a particular date I need to get the records from the database on that particular date, so I tried putting textbox change event as </p>
  
  <pre><code>$(function () {
      $('#txtDate').change(function () {
          $.ajax({
              type: "POST",
              url: "/DataService.asmx/fetchAbsentees",
              contentType: "application/json; charset=utf-8",
              data: "{'date' : '" + $("#txtDate").val() + "'}",
              dataType: "json",
              success: function (data) {
                  alert("Successfully reached.");
              },
              error: function (req, status, error) {
                  alert("ERROR:" + error.toString() + " " + status + " " + req.responseText);
              }
          });
      }).triggerHandler('change');
  });
  </code></pre>
  
  <p>the webservice is getting fired from here fine, but its firing whenever I run the application, I want it to be fired only when I change the date in the textbox......can anyone help me here.</p>
  
  <p>note: am using master page.</p>