I click a button in HTML and it triggers a JavaScript function savePDF
.
I use AJAX to save data into a DB.
I wait for the function 1 to be finished putting this code:
url: "InsertSelectData.php",
dataType: "html",
async: true,
success:
event.preventDefault();
$.when(func01).then(func02);
function 2: I use the same vars from HTML page to generate fpdf but is not creating a pdf.
I have inserted the 2nd ajax inside the Success part of the first one.