How can I have my thanks page redirect to my homepage.

  • Profile Image
    Gougie
    Asked on February 08, 2012 at 01:05 PM

    Currently when the form on my site is submitted it redirects to a custum url, (a simple thanks page I made) which is fine.  However I would like this to then automatically redirect to my homepahe after a couple of seconds.  Is this possible?

  • Profile Image
    fxr
    Answered on February 08, 2012 at 04:14 PM

    This javascript will redirect you to google.com in 3 seconds. 

    <head>

    <script type="text/javascript">

    function delayer(){  window.location = "http://www.google.com" }

    </script>

    </head>

    <body onLoad="setTimeout('delayer()', 3000)">

    <h2>Web Site Content</h2>

    <p>This page is a time delay redirect.</p>

    Here it is working. -> http://pamppi.info/jotform-testing/js/redirect.html

     

    You would need to make the necessary edits for it to suit you needs and add it to your Custom URL Thankyou page. 

    It should be straightforward enough, but let us know if you need any further help with it. 

  • Profile Image
    Gougie
    Answered on February 08, 2012 at 04:29 PM

    How and where exactly do I add this javascript to my page?

  • Profile Image
    fxr
    Answered on February 08, 2012 at 04:58 PM

    Stick the script in your <head> section. 

    i.e this:

    <script type="text/javascript">

    function delayer(){  window.location = "http://www.google.com" }

    </script>

    then just put the <body onLoad="setTimeout('delayer()', 3000)">

    Just after your  closing </head> tag. 

     

     

     

  • Profile Image
    Gougie
    Answered on February 08, 2012 at 06:24 PM

    Thanks.  That worked a treat! :)