-1

I'm currently trying to ensure that when someone clicks a link on my page it opens a new tab instead of simply taking the user there. Unfortunately, I've run into a problem currently I've tried all methods I know of to get a new tab to open when clicking on the link but none of them are working. Does anyone have any idea why? I'm currently using Bulma could this conflict with what I'm trying to do?

<a id="resumeHref"class="navbar-item subtitle has-text-grey-lighter mb-0 m-3"
                        href="./Resume_Daniel_Joseph_Jr.pdf" target="_blank" rel="noopener">Resume</a>
resumeHref.onclick = function(){
    window.open("./Resume_Daniel_Joseph_Jr.pdf",'_blank');
traktor
  • 17,588
  • 4
  • 32
  • 53
Spiritdon
  • 33
  • 4

2 Answers2

0

Try this code:

<a href="Resume_Daniel_Joseph_Jr.pdf">Download PDF</a>

This code works in my browser (Firefox).

Marcos-MD
  • 86
  • 9
0

I figured it out since I'm using Bulma I have multiple versions of my link(desktop, tablet, mobile) I was only changing the mobile version of the link and testing it on the desktop screen width so I need to change all of them so this actually works. Sorry guys had a brain fart there

Spiritdon
  • 33
  • 4
  • 1
    Feel free to delete the question if you want to (and can) :-) – traktor Apr 01 '22 at 23:52
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 02 '22 at 03:22