JQuery AJAX
Introduction
The standard jQuery AJAX call looks like
$.ajax( { url : './Index-be.php', type : 'POST', async : true, beforeSend : function (request) { request.setRequestHeader(lbhguilanguage, userData.GuiLang); }, data: { action : '<?php echo ajaxXmlWeekDeath ?>', location : 'COVID-19', regex : JSON.stringify(regexp), }, datatype : 'xml' }).done( function( textXML ) { // Handler for the success }).fail( function( jqXHR, status, errorThrown) { // Handler for the failure }).always( function( jqXHR, status ) { // Handler for the completion of the AJAX call for both done and fail })