Hello,
When I click with the code below, a new tab opens without being blocked
<a onclick="pdf_dow('201')">PDF</a>
function pdf_dow(pdf_dow_id){
window.open('../pdf.php?pdf=' + pdf_dow_id, '_blank');
}
However, when I click the url with below code the ajax is working and when the ajax is successful I want it to open the new tab page but it is blocked
How to open new tab without being blocked?
<a onclick="create_pdf('201')">PDF</a>
function create_pdf(id){
$.ajax({
type: "GET",
url: "filename.php",
data: {"pdfid" : id },
success: function(){
pdf_dow(id);
}
});
}
I searched a lot on the internet, tried some suggestions, but was unsuccessful.