jquery ajax return data for Internet Explorer error
<p>I use ajax get data but Internet Explorer always error. I tried many methods Can not be solved</p>

<pre><code>var ajaxDate={
     acc:acc,
     pass:pass,
};
var data=ajaxJsonFuc("api/api_login.php",ajaxDate);
if(data.status==1)
{   
    alert('login');
    document.location.href="index.php";
}
else
{
     alert(data.errMsg);
}

function ajaxJsonFuc(ajaxPath ,ajaxData){
      var db;
      $.ajax({
     url: ajaxPath,
     type: "POST",
     dataType: "json",
     data:ajaxData,
     async: false,
     error: function() {
         alert("ERROR");
      },
      success: function(data) {
         db=data;
      }
    });
    return db;
}
</code></pre>

<p>I try Chrome safari OK Internet Explorer error
I use callback</p>

<pre><code>function ajaxJsonFuc(ajaxPath,ajaxData,callback) {
   $.ajax({
    url: ajaxPath,
    type: "POST",
    dataType: "json",
    data:ajaxData,
    error: function() {
         alert("ERROR");
    },
    success: function(data) {
          callback(data);
    }
    });
}


var data;
ajaxJsonFuc("api/api_login.php",ajaxDate, function(data){
  if(data.status==1)
  { 
     alert('login');
     document.location.href="index.php";
  }
  else
  {
     alert(data.errMsg);
  }
}
)};
</code></pre>

<p>Internet Explorer error but Chrome safari is OK 
How do I change my code</p>
