You cannot use the same code for 1 request from many pages.
BUT you can send 2 requests. it can be done by copying your ajax code or by creating a function that receives a URL and sends a request with that URL.
function sendMyAjax(URL_address){ $.ajax({ type: 'POST', url: URL_address, data: { answer_service: answer, expertise_service: expertise, email_service: email, }, success: function (data) { $(".error_msg").text(data); } }); };
Or duan
source share