Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save PardotGists/5cd942a7009ea2b0d1bb to your computer and use it in GitHub Desktop.
Save PardotGists/5cd942a7009ea2b0d1bb to your computer and use it in GitHub Desktop.
Redirecting Your Form Automatically After Displaying Thank You Content Iframe version
<script type="text/javascript">// <![CDATA[
var howLongToWait = 5; //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.top.location.href = urlOfRedirectLocation;
}
setTimeout('startRedirect()', howLongToWait * 1000);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment