title: Access Ajax response using deferred response
body: <p>Code:</p>
  
  <pre><code>function getEcoScore(geometry, dataType){
       return $.ajax({
          type:'POST',
          data: {geometry:geometry,
              attType:dataType},
              dataType:'text',
              url: 'php/eco_query.php'
          });
  
        }
  function test(){
        var x = getEcoScore(geoJsongeom,"wetlands").done();
        console.log(x.responseText);
       }
  </code></pre>
  
  <p>I want to store the result of this request and run a few other requests on different tables, then process the results into an HTML format to form a pop up/dialog box. When I run this code with just console.log(x), I get and object with the responseText, however, then I try to access the responseText it comes up as undefined.</p>
  
  <p>I have tried processing the response in done(function(data){...code...}); but still all i get is an object for x. Is there a particular function for accessing the responseText?</p>
  
  <p>I have used a callback function to assign the response to a global variable &amp; that remains undefined.</p>
  
  <p>The main issue is why I cannot access the responseText variable of the response.</p>