I want to have a button on a page that links to a .pdf in a new tab (easy enough) but I also want that button to trigger the loading of a new url in the original tab. (So when the user closes the tab with the .pdf they see a new page has loaded in the original tab underneath.) Possible?
<a href="https://w3schools.com/" onclick="openNewTab()">
<button type="button">Click me btn</button>
</a>
<script>
function openNewTab() {
window.open('https://google.com', '_blank').focus();
}
</script>