Timed Response.Redirect

Results 1 to 2 of 2

Thread: Timed Response.Redirect

  1. #1
    Rob Guest

    Default Timed Response.Redirect

    I&#039m sure i&#039ve read it somewhere before but alas, I can&#039t seem to find it now.<BR><BR>Anyway, what I want to do is a times Response.Redirect, the reason being, i&#039m one of those ppl that likes to submit forms to themselves and I want to display a confirmation message for, say, 5 seconds before sending the user off to another page.<BR><BR>Any suggestions, I&#039m currently trying different &#039useless&#039 loops to try and slow things down. <BR><BR>Tip: Don&#039t play with loops unless you like rebooting IIS a lot when they start looping infinatly! anyone got Kill.exe then can mail me?) :-)

  2. #2
    keithadler@hotmail.com Guest

    Default RE: Timed Response.Redirect

    Timed events must occur on the client side using either META tags or the JAvaScript SetTimeout function:<BR><BR>E.g.<BR><BR>&#060;META HTTP-EQUIV="REFRESH" CONTENT="5;URL=http://www.yahoo.com"&#062;<BR><BR>Will redirect a user to Yahoo after 5 seconds<BR><BR>E.g. 2<BR><BR>&#060;SCRIPT LANGUAGE=javascript&#062;<BR><BR>&#060;!--<BR><BR> function reload_page()<BR> <BR> {<BR> <BR> location=&#039page.asp&#039<BR> setTimeout(&#039reload_page()&#039,120000);<BR> <BR> }<BR> <BR> setTimeout(&#039reload_page()&#039,120000);<BR><BR >//--&#062;<BR>&#060;/SCRIPT&#062;<BR><BR>I use the code above to refresh the page via Javascript every 5 seconds. You could change the code so that when the user clicks on submit it creates a SetTime function that calls xyz() function after 5000 milliseconds (5 seconds).<BR><BR>I hope this gives you some ideas.

Posting Permissions

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