I try to generate pdf report from mySQL database. The user open a form and then when he click submit it call a php file which retrieve the appropriate data and then generate the PDF from an extended class of TCPDF.
The Problem is as follow...
When i open a form and click submit the pdf is opened in a new tab but if i click submit again the pdf is opened in the same tap not a new one.
if i open multiple forms in multiple tab the generated pdf is opened opeSned in one tab for all forms, and each time i resubmit a form it opened in the same old tab.
how can i fix this so that each time i submit a form it open the generated pdf in a new tap.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you set the "target" attribute of your "form" tag to "_blank", every click on the submit button should open a new tab:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"xml:lang="de"lang="de"><head><title>Test</title><metahttp-equiv="content-type"content="text/html; charset=utf-8"/></head><body><formaction="target.php"target="_blank"><inputtype="submit"value="submit"/></form></body></html>
BTW: This has nothing to to with TCPDF itself.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I already did that, after i click submit a new tab is opened, but when i click submit again (With different form fields e.g. change the selected value in dropdown list ) the new pdf is opened in the same previous tab (the one that display pdf in the first time) not in a new one.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I try to generate pdf report from mySQL database. The user open a form and then when he click submit it call a php file which retrieve the appropriate data and then generate the PDF from an extended class of TCPDF.
The Problem is as follow...
When i open a form and click submit the pdf is opened in a new tab but if i click submit again the pdf is opened in the same tap not a new one.
if i open multiple forms in multiple tab the generated pdf is opened opeSned in one tab for all forms, and each time i resubmit a form it opened in the same old tab.
how can i fix this so that each time i submit a form it open the generated pdf in a new tap.
If you set the "target" attribute of your "form" tag to "_blank", every click on the submit button should open a new tab:
BTW: This has nothing to to with TCPDF itself.
I already did that, after i click submit a new tab is opened, but when i click submit again (With different form fields e.g. change the selected value in dropdown list ) the new pdf is opened in the same previous tab (the one that display pdf in the first time) not in a new one.
Are you sure you're using "_blank" (with underscore!) as a target and not just "blank"?
If so, in which browser and browser version do you experience that problem? Can you provide a code example to reproduce the problem?
you was right, i missed the underscore..
Thank you in advance...