Делаю ajax-запрос внутри ajax-запроса:
$.ajax({
type: 'POST',
url: '1.php',
dataType: 'json',
data: data,
success: function(data) {
$.ajax({
type: 'POST',
url: '2.php',
dataType: 'json',
data: data,
success: function(data) {
}
});
}
});
Всё работает, но не уверен, правильно ли так делать?