Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to add a time delay on thank you page?
SOLVE
Regular Contributor
Oct 1, 2020 10:38 AM
Hello,
I would like to add a time delay and redirect to another page in one of my thank-you pages.
For example
1-page with form
2-fill the form and reach the thank-you page
3- after 5 sec. thank you page redirect you another page
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
1 Accepted solution
Accepted Solutions
Solution
HubSpot Employee
Oct 1, 2020 1:00 PM
Hi Ozgesila
One way this can be done by adding a piece of JavaScript in the head of the thank you page in the page settings.
This code fires when the page loads, waits 2 seconds (2000 ms) and then redirects to the url on the fourth line.
<script>
window.onload = function(){
setTimeout(function(){
window.location.href = "http://www.mysite.com/new-page";
}, 2000);
};
</script>
I hope that helps,
- David
David Leonard-Scully
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Reply