When I click the link to download the PDF, I would like pdf to appear on the same tab, and on the second tab, the page / case studies would load .
Is it possible?
I currently have:
<h2 style="text-align: center;"><a href="http://cdn2.hubspot.net/hub/155045/file-847580737-pdf/Stepping_into_a_new_age_of_marketing_with_CRM_FINAL_APPROVED.pdf" id="pdflink" target="_blank" download=""><strong>Click here to download your eBook</strong></a></h2>
<script type="text/javascript">// <![CDATA[
document.getElementById("pdflink").onclick = function () {
location.href = "https://www.workbooks.com/case-studies";
};
// ]]></script>
However, this opens the redirect on the second tab, but since the main window confuses the visitor (as if in IE or FF), they do not release the PDF that opens on the first tab.
Any tips?
source
share