Тема: xhr.abort();
Показать сообщение отдельно
  #3 (permalink)  
Старый 14.08.2017, 13:05
Интересующийся
Отправить личное сообщение для sgu64 Посмотреть профиль Найти все сообщения от sgu64
 
Регистрация: 13.08.2017
Сообщений: 11

Вызов ф-ии:
ajaxRequest("user.get", formData);

Сама ф-я
function ajaxRequest(method, data) {


	xhr_ajax = $$.ajax({
		url: "https://***/" + method,
		method: "POST",
		crossDomain: true,
		data: "data=" + data,
		error: function (response) {
			myApp.hideProgressbar();
		},
		success: function (response) {

			console.log("Ответ скрыт");

			ajax_response(method, JSON.parse(response));
			

			response = null;

		},
		complete: function (response) {
			
			myApp.hideProgressbar();
		},
		error: function (response) {
			
			alert("ВСЕ!");
		},
		start: function (response) {
			
			console.log("Начал!");
		}
	});

}
Ответить с цитированием