Use this to wait 10 seconds:<BR>http://www.serverobjects.com/comp/waitfor.zip<BR><BR>Then redirect, but I'd prefer it if you used meta tags client-side, i.e.:<BR><BR><META HTTP-EQUIV="Refresh" CONTENT="10; URL=page.asp"><BR>
Not an ASP answer but will work...you can use a meta refresh in the head of your document:<BR><BR><meta http-equiv="Refresh" content="10; url=whatever.asp">
Thanks for the meta info, but I don't think this will work in what I'm doing.<BR>I have a sub in my page which is called to delete a record in a database, after doing this I want the subroutine to redirect back to my welcome page. Hope this makes sense.<BR>Any ideas?<BR>S.
... just putting the redirect after the database update:<BR><BR>SUB deleteRecord<BR>'<BR>'..update database<BR>server.transfer("welcome.asp") <-- for IIS 5.0<BR><BR>response.redirect("welcome.asp") <-- for IIS 4.0<BR><BR>end sub<BR><BR>
If your idea is to redirect to a page or another depending on the branch your page You can try a JavaScript inbetween your IF branches. i.e:<BR><BR><%<BR>'code<BR>'code<BR >'code<BR>IF A Then %><BR> <SCRIPT LANGUAGE="JavaScript"><BR> <!--<BR> setTimeout "document.location='page-if-a.asp';",3000);<BR> //--><BR> </SCRIPT><BR><% Else %><BR> <SCRIPT LANGUAGE="JavaScript"><BR> <!--<BR> setTimeout "document.location='page-if-NOT-a.asp';",3000);<BR> //--><BR> </SCRIPT><BR><% END IF %><BR><BR><BR>NOTE: 3000 is the time in ms = 3 seconds<BR>
Thanks for the info, but I just couldn't get this to work.<BR>I tried:<BR>%><BR><SCRIPT LANGUAGE="VBScript"><BR>window.setTimeout("re directsub",5000)<BR></SCRIPT><BR><%<BR>sub redirectsub<BR>Response.redirect "Welcome.asp"<BR>end sub%><BR><BR>Which failed with the error:<BR>can't use parentheses when calling a sub.<BR><BR>I also tried the Javascript suggestion:<BR>%><BR><SCRIPT LANGUAGE="JavaScript"><BR><!--<BR>setTimeout"document.location='Welcome.asp ';",5000);<BR>//--><BR></SCRIPT><BR>That gets the error:<BR>Expected";"<BR><BR>Any ideas most appreciated!<BR>
Bookmarks