AnsweredAssumed Answered

how to bypass popup's to download a pdf in new window

Question asked by Naveen Kumar on Jan 6, 2018
Latest reply on Jan 6, 2018 by Sanford Whiteman

Hi All,

 

My requirement is when i submit a form in landing page it should redirect to thank you page and once the thank you page loads the pdf should be downloaded in a new window or tab.

 

The pdf is opening in a new window but popup's are blocking is there any parameters we can put in window.open function?

 

I am writing the code in thank you page template to open a pdf in a new window but popup's are blocking

 

i have added setTimeout(window.open(".pdf", "_blank"), 2000) in document.ready function.

 

Below is the code :

 

$( document ).ready(function() {

  SocialManager.init();

      event.preventDefault();

      setTimeout(window.open(".pdf", "_blank"), 2000);

 

});

 

Thanks in advance !!

Outcomes