Home > Enterprise >  _blank, rel="noopener" and script not working to open a new tab for my resume
_blank, rel="noopener" and script not working to open a new tab for my resume

Time:04-02

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"
                        href="./Resume_Daniel_Joseph_Jr.pdf" target="_blank" rel="noopener">Resume</a>
resumeHref.onclick = function(){
    window.open("./Resume_Daniel_Joseph_Jr.pdf",'_blank');

CodePudding user response:

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

CodePudding user response:

Try this code:

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

This code works in my browser (Firefox).

  • Related