Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Jul 2002
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Redirect after a certain amount of time

    I need to display a message on screen then redirect to a different url after a certain amount of time, say 10 seconds.

    Does anyone know of an easy way to do this ?

    Thanks

    Steve.

  • #2
    Regular Coder
    Join Date
    Aug 2002
    Location
    Spain
    Posts
    420
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Use the meta refresh:

    <meta http-equiv="refresh" content="10;URL=newpage.htm">
    Don't resist to assimilation. Billions of Borgs can't be wrong!

  • #3
    Regular Coder
    Join Date
    Dec 2002
    Location
    UK
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    yes

    <head>
    <meta http-equiv="Refresh" content="5;url=http://www.google.co.uk">
    </head>

    put it in the head, the 5 is how many seconds you want it to wait.

  • #4
    New Coder
    Join Date
    Jul 2002
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    That not going to work

    Its running on an asp page and I need it to redirect to one page if a condition is met or another page if its not.

    it need to be something like this

    if a = true then
    to page 1
    <wait 10 seconds>
    redirect to page 1
    else

  • #5
    New Coder
    Join Date
    Jul 2002
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    That not going to work, sorry about the above

    Its running on an asp page and I need it to redirect to one page if a condition is met or another page if its not.

    it need to be something like this

    if a = true then
    to page 1
    <wait 10 seconds>
    redirect to page 1
    else
    to page 2
    <wait 10 seconds>
    redirec to page 2
    end if


    thanks

    Steve.

  • #6
    Regular Coder
    Join Date
    Aug 2002
    Location
    Spain
    Posts
    420
    Thanks
    0
    Thanked 0 Times in 0 Posts
    well, you can use javascript:

    if (condition) setTimeout("self.location='thepage.htm'",10*1000)
    Don't resist to assimilation. Billions of Borgs can't be wrong!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •