Hello all,
I want to write the following JS code but I am not sure if it will work - its going to be a lot more complicated than the below and I was hoping to get advice from others before I waste a lot of time.
function ajax_request(array_element){
$.get("process_txt.php", { path: full_path },
function (data){
});
}
function bulk_upload(){
//loop through array
//Call ajax function on one element of array - ajax_request(array_element)
//Does the loop wait for the ajax request to be completed to come
}
From the above, will the loop wait for the AJAX request or just continue? If it continues, how can I get it to wait? If there is not a way to do this, shall I re-think my logic?!
I appreciate any help.