Generating PDF With DOMPDF With Codeigniter On Button Click After Submission Of Data In To Database
Solution 1:
Is your desired interaction for the user to submit the form then be presented with a download dialog for the PDF? By using AJAX to manage the process you won't be offered the opportunity to download the PDF since the AJAX process makes the call and receives the response. This all within the context of the current page.
You could capture the response then open a new window and populate it with your PDF. But I'd advise against it unless you have a true need. Don't make the process harder than it needs to be. The easiest method is to make a normal POST request instead of an AJAX POST request. Typically the user won't ever leave the current page because the download process will cancel page navigation.
If you're intent on doing this using AJAX, there are lots of related questions.
Post a Comment for "Generating PDF With DOMPDF With Codeigniter On Button Click After Submission Of Data In To Database"