Добрый вечер, на jquery-3.7.0 перестала работать js, на jquery-2.1.1 все работало нормально.
function saveform() {
var dst = '';
pricetype = $('select[name="price_type"]').val();
if (pricetype == 1) dst = 'csv';
if (pricetype == 2) dst = 'xml';
if (pricetype == 3) dst = 'excel';
$.ajax({
url:
'/admin/index.php?route=' +
module_path +
'/savesupplier&user_token=' +
getURLVar('user_token') +
submit_url,
data: $(
'input[name="suppl_name"], #tab-settings input, #tab-settings select'
),
type: 'post',
dataType: 'json',
done: function (data) {
if (!data.error) {
$('#tab-settings').remove();
save_chemacategs(data.supplier_id, dst, 0);
} else {
console.log(data);
}
},
fail: function (jqXHR, textStatus, errorThrown) {
console.log(textStatus + ' ' + errorThrown);
}
});
}
должно перейти на save_chemacategs, но это не работает.
было
success: function (data) {
и
error: function (jqXHR, textStatus, errorThrown) {
были ошибки
нашла инфу что надо
success заменить done и fail вместо error
заменила, ошибки ушли, но все равно не работает. ошибок в консоле нет