title: jQuery ajax responseText 'undefined'
body: <p>I've got some jQuery which posts two variables to a php script. The PHP is very simple and simply returns a string based on what it's given, i.e. 'update successful' which I'd like to use in some way on the page.</p>
  
  <p>The first time I click I get an alert saying 'undefined', any further clicks and everything works fine. Pretty sure I'm not far off but I can't work out this problem!</p>
  
  <p>I've used firebug and the data is posted and the correct response is received on all attempts.</p>
  
  <pre><code>$(document).ready(function(){
  
      $('#updatehol').click(function() {
      additions  = $('#additions').attr('value');
      deductions   = $('#deductions').attr('value');
      datastring = 'additions='+ additions +'&amp;deductions='+ deductions;
  
      $.ajax({
                  type: "POST",
                  data: datastring,
                  url: "doadjust.php",
                  complete: function(data) {
                  alert(data.responseText);
                  }
                 });
      });
  });
  </code></pre>