Hello I have ajax call in jquery
$.ajax({
url: 'route_process.php',
cache: false,
async: false,
type: 'post',
data: id,
dataType: 'html',
success: function(data) {
data = data.split("brk");
sent_notification(data[1], data[2], data[3], data[4], data[5], data[6], data[7],data[8],data[9],data[10]);
alert(data[0]);
},
I will get some data after success which I use for function with another ajax.
function sent_notification(type_search, insert_id_search, date_search_array_search, from_city_lat_search, from_city_lng_search, to_city_lat_search, to_city_lng_search, counting, insert_id_search2, date_search_array_search2) {
$.ajax({
url: 'sent_hike_drive_notification.php',
cache: false,
type: 'post',
async: true,
data: {type: type_search, insert_id: insert_id_search, date_search_array: date_search_array_search, from_city_lat: from_city_lat_search, from_city_lng: from_city_lng_search, to_city_lat: to_city_lat_search, to_city_lng: to_city_lng_search, counter: counting, insert_id2: insert_id_search2, date_search_array2:date_search_array_search2},
dataType: 'html',
success: function(data) {
}
});
}
Basically from this next ajax I dont need any success data. Could run async. But sometimes it happens I will get alert(data[0]) from first function and after confrim OK browser freezes. It looks like it is waiting for ajax finish inside sent_notification function. But I dont care result of this second ajax it is just some notification. As I said it happens only sometimes, I think it depends on second ajax execution time. How to modify my code to get success on first ajax and then execute some another ajax using data from this first ajax without any browser freezing. I thought just put async to ture to another ajax should be OK. Thanks