来自AJAX Call的错误,但无法知道它是什么类型的错误

时间:2016-07-21 11:20:04

标签: jquery ajax

我在我的HTML代码中有这个AJAX调用,但代码直接运行error属性,将textStatus作为“错误”给出,没有描述它是什么类型的错误。

另外,我检查了“数据”属性是否有任何问题。我找不到。

我不确定发生了什么事?请帮忙!

  $(document).ready(function(){ 
  $("#SendValues").click(function(){

 var street_number_new = $("#street_number").val();
 var route_new = $("#route").val();
 var locality_new = $("#locality").val();
 var admin_area_new = $("#administrative_area_level_1").val();
 var postal_code_new = $("#postal_code").val();
 var country_new = $("#country").val();
 var AddressFields = new Array();
  AddressFields[0]= street_number_new
  AddressFields[1]= route_new
  AddressFields[2]= locality_new;
  AddressFields[3]= admin_area_new ;
  AddressFields[4]= postal_code_new ;
  AddressFields[5]= country_new;
  alert("The values stored are"+AddressFields);

  $.ajax({
type:"POST",
url:'https://forms.na1.netsuite.com/app/site/hosting/scriptlet.nl?script=603&deploy=1&compid=TSTDRV1354957&h=d6eda18a4f37d2a41d2c',
data: AddressFields ,
success: function(data){
alert("Values went through "+ AddressFields);
  },

  error: function(){

    alert("Values did not go through");
  },
complete: function(response, textStatus) {
return alert("Hey: " + textStatus);
}
});
});

0 个答案:

没有答案