title: Passing variable outside ajax function
body: <p>Please help - I have the following code which returns the variable 'results' in an alert. I want to use this variable outside of the function, and cannot get a callback, or outside declaration to work successfully. I'm sure I'm being a muppet, so I apologise for this basic question.....</p>
  
  <pre><code>&lt;script src='http://code.jquery.com/jquery-1.9.1.js'&gt;&lt;/script&gt;
  &lt;script&gt;
  
  $(function () {
      $.ajax({
          type: 'POST',
          dataType: 'jsonp',
          url: 'https://creator.zoho.com/api/json/my-company-culture/view/PageFeed_Report?scope=creatorapi&amp;authtoken=d670dc68ac0f6d7ca389e7b206a25045',
          success: function (results) {
              var raw_result=JSON.stringify(results);
              alert(results);
          }
      });
  });
  
   &lt;/script&gt;
  </code></pre>