Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

ASP Redirects

Options
  • 19-09-2005 2:51pm
    #1
    Registered Users Posts: 597 ✭✭✭


    Hi All,

    I'm trying to set up an asp script that redirects a user after a few seconds on a page - I cant use meta tags to redirect due to the page structure.

    does anyone have any similar scripts they could share?

    Thanks folks.


Comments

  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    yeraulone wrote:
    Hi All,

    I'm trying to set up an asp script that redirects a user after a few seconds on a page - I cant use meta tags to redirect due to the page structure.

    does anyone have any similar scripts they could share?

    Thanks folks.

    I don't think you can use ASP to redirect after a given interval - they redirect as soon as the page is processed. You could try using JavaScript though. I think the syntax is as follows. The 3000 means 3 seconds
    <script type="text/JavaScript">
     	var x = setTimeout("document.location.href='newpage.asp'",3000);
    </script>
    

    HTH

    Eoin


  • Registered Users Posts: 597 ✭✭✭yeraulone


    That did the job - thanks Eoin

    also I just found this

    <%
    Response.AddHeader "Refresh", "10;url=http://www.siteaddress.com/&quot;
    %>

    and it seemed to work also.


  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    yeraulone wrote:
    That did the job - thanks Eoin

    also I just found this

    <%
    Response.AddHeader "Refresh", "10;url=http://www.siteaddress.com/&quot;
    %>

    and it seemed to work also.

    Cool, I thought that would count as the meta tags that you said you couldn't use.


  • Registered Users Posts: 597 ✭✭✭yeraulone


    nor did I, but it seemed to work fine. It was an "all in one page" effort, and I couldn't put the redirect in the meta details. But it was ok to use the script:

    Response.AddHeader "Refresh", "10;url=http://www.siteaddress.com/&quot;

    after the page had be submitted. I probably didnt properly say what I was trying to do. Anyhooo - it seems to work. Thanks Eoin.


Advertisement