Scope variables in javascript,jquery
<p>I am trying to access variable 'dimensions' in my ajax response but not able to get it. I dont want to make this variable global. Following is my code<br></p>

<pre><code>  $(document).ready(function(){
  $('#submittext').click(function(){
   var dimensions;
   $.ajax({
     type: "GET",
     url: "bin/getcontentsize.php",
     data: findContentsize,
     success: function(response){
       //want to access dimensions here to assign response and some calculation(but not able to access it)
     }
     });
   //so i can use here
  });
  });
</code></pre>
