Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to show a confirmation page for a few seconds before redirecting i 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,
>
> I am trying to redirect a user from a form confirmation page back to a
form
> input page but would preferably like the confirmation page to be shown for
> 1-2 seconds before the redirect happens. The code I am using at present is
>
> <SCRIPT language=&quot;JavaScript&quot;>
> <!--
> window.location.href = '> //-->
> </SCRIPT>
>
> This code allows the form input to happen but doesn't show the
confirmation
> page addcontact.asp. My question would be how can I cause the
confirmation
> page to briefly show before the redirect occurs.
>
> Thanks,
 
try:

setTimeout(&quot;window.location = '
if you are using a modern browser (5+) you should be able to say:

setTimeout(function(){window.location = '
or better yet (for readibility):

function goAway()
{
window.location = '}

setTimeout(goAway,2000)

This is because, modern browsers allow function references in place of eval'ed strings in setTimeout and setInterval method calls. jared@eae.net -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top