I have small doubt about the ajax request
If I send a couple of AJAX request, will response received in that same order ? req1, req2 and then response for req1 is received and then response for req2. Is there any possibility that response for req2 is first received ??
I am not storing column_index value and when I receive response, Will it pickup correct column_index?
Code:
function make_ajax_call(column_index) {
jQuery.ajax({
url: site.adminajaxurl + '?action=display_items',
type: 'POST',
data: {
id: dbase_header[column_index]
},
// dataType: "json",
success: function(data) {
// Until we get all responses hide the submit button
jQuery('body')
.find('#submit_template_div')
.hide();
// Store the html content received for a template
data_html[column_index] = data;
// Increase response count
response_display_item++;
// If all response received
if (response_display_item == request_display_item) {
// Reset request count and update framework
response_display_item=0;
request_display_item = 0;
print_menu = 1;
update_framework();
}
}
});
}