Javascript AJAX-技术错误
我使用prestashop v1.5.6,其中一个模块让我头疼。我不明白是什么导致了这个问题,因为它不是一直出现的,只是在访问结帐页面或刷新页面时才会出现 功能是:Javascript AJAX-技术错误,javascript,json,ajax,Javascript,Json,Ajax,我使用prestashop v1.5.6,其中一个模块让我头疼。我不明白是什么导致了这个问题,因为它不是一直出现的,只是在访问结帐页面或刷新页面时才会出现 功能是: function loadcart() { $('#opc-right-summary-content #opc-page-loader').fadeIn(); $.ajax({ type: 'POST', url: orderOpcUrl, async: false, cache: false,
function loadcart() {
$('#opc-right-summary-content #opc-page-loader').fadeIn();
$.ajax({
type: 'POST',
url: orderOpcUrl,
async: false,
cache: false,
dataType: "json",
data: 'ajx=true&method=loadcart&token=' + static_token,
success: function (jsonData) {
if (jsonData.hasError) {
var errors = '';
for (error in jsonData.errors)
//IE6 bug fix
if (error != 'indexOf')
errors += jsonData.errors[error] + "\n";
alert(errors);
} else {
$('.cart-container').html(jsonData.cart_bl);
if(jsonData.err_isset){
$('#cart_errors').html('');
$('#cart_errors').html(jsonData.err);
$.each(jsonData.array, function(){
var elem = this;
$('.cart_item').each(function(){
var id = $(this).attr('id');
if (strpos(id, 'product_' + elem.id_product + '_' + elem.id_product_attribute) !== false){
$(this).find('td').css('background-color', '#e46f61');
}
});
});
}
$('#opc-right-summary-content #opc-page-loader').fadeOut();
}
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert("TECHNICAL ERROR: unable to loal оплата \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);
}
});
}
JS弹出错误:
技术错误:无法loalöПаааа 细节: 抛出错误:[对象] 文本状态:错误 领事馆的错误是:
[Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
send @ jquery-1.7.2.min.js:4
jquery-1.7.2.min.js Failed to load resource: the server responded with a status of 500 (Internal Server Error)
send @ jquery-1.7.2.min.js:4
POST http://-------/ru/quick-order 500 (Internal Server Error)
send @ jquery-1.7.2.min.js:4
ajax @ jquery-1.7.2.min.js:4
loadcart @ main.js:618
(anonymous) @ states.js:15
o @ jquery-1.7.2.min.js:2
fireWith @ jquery-1.7.2.min.js:2
ready @ jquery-1.7.2.min.js:2
B @ jquery-1.7.2.min.js:2
谁是AJAX的大师请给我一个atlist提示,为什么会出现此错误?那么服务器的错误消息中有什么?技术错误:无法拒绝详细信息:抛出错误:[对象对象]文本状态:错误您收到500个内部服务器错误响应,这意味着问题最有可能发生在您的服务器上,不是AJAX调用或JavaScriptAt,我也考虑过这一点。但为什么这不是所有的时间。它只有在我刷新页面10-15次时才会出现。当我访问页面时,它也会出现20分之一