Solution 1 :

You can either use an anchor tag and style it

<a class="btn btn-success" href="" target="_blank">Google</a>

Or you can change your button to

<button title="button title" class="action primary tocart" onclick="'', '_blank'); return false;">Google</button>

Solution 2 :

<button type="button" onclick="'')"> button</button>

Problem :

Im trying to create a button that links to a PDF file open in a new window.
Tried the _blank method but that didn’t work.

<button onClick="parent.location='files/sample.pdf'" class="send" >Curriculum vitae</button>



Comment posted by Adrian

Using a button? Why not an anchor tag?

Comment posted by Ronaldo Bertz

Because i use multiple buttons, and i try to keep the styling the same

Comment posted by Adrian

Yes, what I meant is…

Comment posted by Zunaib Imtiaz

Glad to help 🙂