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 7 of 7

Thread: wait 2 sec

  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    wait 2 sec

    after submit the form enterd by user i want to wait 2 seconed in confirm.asp then redirect them to another page
    Last edited by ahmedsoliman; 07-18-2002 at 12:56 AM.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <meta http-equiv="Refresh" content="2; URL=http://www.yourpage.here">
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i know this code by html but i thought there are a same function by asp,like this site when i post qustion or reply
    thank you
    Last edited by ahmedsoliman; 07-18-2002 at 08:41 AM.

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can make it a variable, of course! I do this on some sites at work:

    <meta http-equiv="Refresh" content="2; URL=<% = PAGE_URL %>">

    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    P.S. That should work fine, however here is a sample script done in ASP that will do the same thing:

    <%
    ' Get Start Time
    StartTime = Timer()

    'Get End Time
    EndTime = Timer()

    'Determine how long it took
    WaitTime = EndTime - StartTime

    'Continue checking the elapsed time until it reaches 5 seconds
    do while WaitTime < 5
    'Get End Time
    EndTime = Timer()

    'Determine how long it took
    WaitTime = EndTime - StartTime
    loop

    'Redirect user, since we know that it has been more than 5 seconds
    Response.Redirect "page2.asp"
    %>

    From: http://www.askasp.com/articles.asp?ArtID=85

    As you can see, generally it will be easier to use the HTML way.

    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Location
    Northern NJ
    Posts
    404
    Thanks
    0
    Thanked 1 Time in 1 Post
    what about Response.AddHeader "Refresh", "2;URL=mypage.htm" ??
    I would rather be a lion for a day than a lamb that lives forever.

  • #7
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    They're all good.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)


  •  

    Posting Permissions

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