Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save PardotGists/45b8e09d34bf5b5d8901 to your computer and use it in GitHub Desktop.
Save PardotGists/45b8e09d34bf5b5d8901 to your computer and use it in GitHub Desktop.
Redirecting Your Form Automatically After Displaying Thank You Content Example 1
<script type="text/javascript">// <![CDATA[
var howLongToWait = 2; //number of seconds to wait
var urlOfDownloadContent = 'http://www.example.com/whitepaper.pdf';
function triggerDownload() {
window.location = urlOfDownloadContent;
}
setTimeout('triggerDownload()', howLongToWait * 1000);
// ]]>
</script><script type="text/javascript">
var howLongToWait = 5; //number of seconds to wait
var urlOfRedirectLocation = 'http://www.example.com/home';
function startRedirect() {
window.location = urlOfRedirectLocation;
}
setTimeout('startRedirect()', howLongToWait * 1000);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment