I have a button in my form, which generates PDF files and saves in the local machine; now after saving them in local machien by clicking the button I want to see the files in the browser for download too(which more than one files) ;
My attempted code is as following:
<form name="frm1" id="frm1" method="post" enctype="multipart/form-data">
.
.
.
<button type="submit" name="btnCreatePDF_8" class="btn btn-primary" onclick= "newDoc();"> Export to PDF </button>
</form>
<script>
function newDoc()
{
window.open("http://localhost/MyProject/1234_1_8.pdf")
}
</script>
It creates the PDFs but I cannot get my javascript function (newDoc()) work!
Your help is appreciated! Also if you need more clarification, please let me know which part I have to provide more clarification.
Thanks