I am calling below jquery method to export the table details into PDF. PDF file is created in the java class while it is called and available in the path C:\apache-tomcat-7.0.40\webapps\TestProj\PDFfiles and the JSP where im having this script is loacted at C:\apache-tomcat-7.0.40\webapps\TestProj\WEB-INF\jsp But window.open is not working. I can get the alert message of "PDF generation success ---"
Any idea? Please help.
function openPDF() {
$.post("generatePDF", {action : "get"}, function(data) {
if (data.returnStatus == "SUCCESS") {
alert("PDF generation success ---");
var win = window.open('', 'fullscreen=no');
win.location.href = '../../PDFfiles/TestPdf.pdf';
win.focus();
//window.open('../../PDFfiles/TestPdf.pdf', 'fullscreen=no');
}
}, 'json');
}
I have tried below snippet also but no use..
window.open('../../PDFfiles/ShopsListPdf.pdf', 'fullscreen=no');