Re: Need to execute two events simultaneously post form submission

Anonymous
Not applicable

Need to execute two events simultaneously post form submission

Hi Everyone,

I am creating a campaign where post form submission (for a whitepaper) I would like to trigger the following two activties simultaneously:
1>Show a thank you page &
2>PDF download hapenning automatically

I tried playing with some triggers but i was not able to crack it. I would appreciate if someone who has done something similar share their ideas/views on this.

Thanks! 

Tags (1)
8 REPLIES 8
Kenny_Elkington
Marketo Employee

Re: Need to execute two events simultaneously post form submission

Hi Vinay,

To set your thank- you page, just make sure you have your Form Settings on that particular landing page set to go to the thank you page.  For part two, you'll need to include some HTML in the Head of the thank you page(like in this article: https://community.marketo.com/MarketoTutorial?id=kA250000000Kz4KCAS)  The code will look like this:

<meta http-equiv=”refresh” content=”n; url=www.example.com/document.pdf”>

replace n with the number of second you want to wait before starting the download, and the url string with your asset link.


Anonymous
Not applicable

Re: Need to execute two events simultaneously post form submission

Hi Kenny,

Thanks for quick response. I just tried this and it worked, but it removed my thank you page and replaced it with the downloaded PDF. In other words it worked like a redirected URL from the thank you page url to the PDF url. I would prefer the thank you page staying and the PDF downloading after the stipulated time on a seperate window/tab. Anyway i can implement this?

 


Archana_Ranjan1
Level 2

Re: Need to execute two events simultaneously post form submission

So Basically you will create a landing page.
On landing page put form .
Edit form settings landing page will redirect to thank you page.

0EM50000000SVLb.jpg

To automatically redirect to PDF use HTML code.
Use HTML element in landing page.
0EM50000000SVLg.jpg
Archana_Ranjan1
Level 2

Re: Need to execute two events simultaneously post form submission

Increase Number of seconds.
Archana_Ranjan1
Level 2

Re: Need to execute two events simultaneously post form submission

Try something like this: 

<script language="javascript" type="text/javascript">
     <!--
     window.setTimeout('window.location="http://www.mywebsite.com"; ',10000);
     // -->
 </script>
Grant_Booth
Level 10

Re: Need to execute two events simultaneously post form submission

I don't think it will be possible to open in a new tab/window due to browser security settings:
http://stackoverflow.com/questions/19293014/automatic-open-pop-up-new-window-using-javascript

B
ut if you're ok with having them click something, you could use the open() method mentioned there.
(stackoverflow.com is great way to learn how to do things like this)
Kenny_Elkington
Marketo Employee

Re: Need to execute two events simultaneously post form submission

Hi Vinay,

The refresh to open in the current tab is a consequence of your browser's MIME type settings and is controlled locally.  You like have PDFs set to open in the native pdf reader of your browser which prompts the tab to navigate to the pdf.  If you want to open in a new tab/window there is not a way to do this without getting caught in a pop-up blocker unless you prompt the user to click/interact with the page beforehand.  You can get clever with the form onSubmit event, but that might not be an ideal solution.

Anonymous
Not applicable

Re: Need to execute two events simultaneously post form submission

Hi Kenny / Archana / Grant,

Thanks for all your replies. I figure it will be best for now I allow the user to inetract on the Thank You page by clicking on "download your whitepaper now".  In case if i come up with some alternate solution i will post it under this topic.

Agains Thanks!