title: Extjs:Set variable after ajax request
body: <p>How I can set "price" variable after ajax call?
  here the code:                   </p>
  
  <pre><code>                var price;
                  var idProd = data.prodotto_id;
  
                  var cb = function (o,s,r){
  
                      price = Ext.util.JSON.decode(r.responseText).price;
                      console.log(price);
                  };
                      Ext.Ajax.request({
                          url : "index.php",
                          params : {
                              m : "Prodotti",
                              a : 'prod-price-byquantity',
                              idProd : idProd,
                              quantity: qta
                          },
                          callback : cb,
                          scope : this
                      });
  
  
                  console.log(price);
  </code></pre>
  
  <p>In the last console.log(price) I see price as undefined</p>