I see what you're saying. Our dev team also told us the same thing and we proceeded with the form redirecting to the PDF and navigating the user away from our site in this case because of the pop up issue. So we actually never solved this thread.
The solution is in the other thread.
This has always been solid for me, the reload is to close the lightbox in the original window. or you can replace the reload with $('.mktoModalClose').modal('hide');
<script src="//app-sj07.marketo.com/js/forms2/js/forms2.min.js"></script>
<script>
function Form() {
MktoForms2.loadForm("//app-sj07.marketo.com", "0000-TDW-0000", 0000, function (form){MktoForms2.lightbox(form).show();
form.onSubmit(function (){window.open('', 'myWindow');
});
form.onSuccess(function(values, followUpUrl){window.open('www.google.com', "myWindow" );
location.reload();
return false;
});
});
}
<script>
-----html-----
<button onclick="Form();">View</button></h1>
</div>
Yes, that uses the same pattern as in the solution, although you don't need the second window.open once you have a reference to the window.
Forgot to mention
IMPORTANT! to avoid pop up blocker, do not use "If known visitor show custom HTML"
In the example i did put "google.com" but you must use a Marketo LP (same domain), and if you want to go to somewhere else you must redirect it.
There's no such restriction, Diego. As long as you follow the correct pattern you will avoid pop-up blockers regardless of whether the Thank You URL is on an external URL and/or whether you use KL HTML.
See the existing demo MktoForms2 :: Thank You New Window