javascript from form opening asset in pop up
I embedded a form into a non-marketo landing page but when the PDF opens it does so in a pop up window, which is being blocked by pop up blockers instead of downloading it. I asked my developer about doing it "onclick" instead but he wasn't sure if that would work without filling out the form or not...
form.onSuccess(function(values, followUpUrl){
//download the PDF
var a = document.createElement('a');
a.href='***.pdf';
a.target = '_blank';
document.body.appendChild(a);
a.click();
is there a different way to code this part?
