title: Nested $.getJSON, calls not working
body: <pre><code>    function dispatchVehicle(){
          if(!chickAll()){
              return false;
          }
          var action = window.url + '?&amp;method=dispatchVehicles'
                  + "&amp;conLclFlag=" + conLclFlag
                  + "&amp;containerId=" + containerId 
                  + "&amp;vehicleNameFlag=1"
                  + "&amp;t=" + (new Date()).getTime();
  
          jQuery.getJSON(action, $('#vehicleForm').serialize(), function(data) {
              if(data.flag){
                  if (window.confirm(data.message)) {
                      alert(1);
                      var action1 =  window.url + '?&amp;method=dispatchVehicles'
                          + "&amp;conLclFlag=" + conLclFlag
                          + "&amp;containerId=" + containerId 
                          + "&amp;vehicleNameFlag=2"
                          + "&amp;t=" + (new Date()).getTime();
                      alert(2);
                      jQuery.getJSON(action1, $('#vehicleForm').serialize(), function(data1) {
                      alert(3);
                      if(!data1.flag){
                          alert(data1.message);
                      }
                      if (data1.succ) {
                          window.parent.location.reload();
                          window.parent.ClosePop();
                      }
                      });
                  }
              }
              if (data.succ) {
                  window.parent.location.reload();
                  window.parent.ClosePop();
              }
          });
      }
  </code></pre>
  
  <p>I need to perform two ajax calls through jQuery's getJSon function.</p>
  
  <p>The thing is that, once one of the calls is performed and data.flag is true, call the second getJSon function (because I need the result of the first call as a condition in the second call).
  But when the function runs, the code "alert(3)" can not be executed.</p>
  
  <p>Any help will be appreciated.</p>