• Resolved Mirko01

    (@mirko01)


    Hi everybody!

    I’d like to make a link from page “A” to page “B” on my website through the intermediate page “AB” with an image and a few words (e.g. “Good Choice!”). How can I make page “AB” to be visible for short period of time (e.g 3 seconds) and then automatically redirect to page “B”? Something like (in laic words) “pause for 3 seconds and go to http:/www.etc” 🙂

    Thanks for your time!

Viewing 5 replies - 1 through 5 (of 5 total)
  • There’s two ways of doing it.

    The first way is to use JavaScript to set up a refresh in 3 seconds after the page has loaded. The second way is to set up a META redirect. JavaScript works as long as your visitors have JavaScript turned on (most will, but there’s always going to be someone that doesn’t), but the META redirect will work all of the time.

    Regardless of that, you should always have another button or link saying something like “If you aren’t redirected in 3 seconds please click here” for people who’s browsers don’t allow the redirects, or who are just impatient.

    Thread Starter Mirko01

    (@mirko01)

    Thank you!

    As you’ve probably noticed, I’m an apprentice. Would you be so kind and write this JavaScript for me?

    <script type="text/javascript">
    window.onload=timeout;
    function timeout(){
    window.setTimeout("redirect()",3000)}
    function redirect(){
    window.location="/page_here/"
    return}
    </script>

    Add to the specific page template – note this belongs in the head so also create custom header and call that in the specific page template.

    Edit: redacted this line

    Thread Starter Mirko01

    (@mirko01)

    Great. I’ll try. Thank you,
    Mirko

    Thread Starter Mirko01

    (@mirko01)

    Well, I inserted your script directly in intermediate page (in text mode) and WordPress changed script into:

    <script type=”text/javascript”>// <![CDATA[
    window.onload=timeout;
    function timeout(){
    window.setTimeout(“redirect()”,3000)}
    function redirect(){
    window.location=”desired-page/”
    return}
    // ]]></script>

    But most important – it works!
    You can check it here: http://www.tangens.si/ponudba/
    Click on the left option (on the house full of people).

    So Thank you again!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Intermediate page for 3 sec and redirect automatically’ is closed to new replies.