timed redirect to another page

F

FN

I know how to do an HTML content redirection (e.g. in 5 seconds you'll be
redirec to...) but...

I have a javascript countdown timer. It goes for a few hours. At the end,
I want to dispaly "times up", wait 10 more seconds, and then redirect to
another page. Is there a javascript way to do this, and would it work
going back to IE4 and NN4.5?
 
E

Evertjan.

FN wrote on 11 jul 2003 in comp.lang.javascript:
I have a javascript countdown timer. It goes for a few hours. At the
end, I want to dispaly "times up", wait 10 more seconds, and then
redirect to another page. Is there a javascript way to do this, and
would it work going back to IE4 and NN4.5?

url="http://cnn.com/"
setTimeout("location.href=url",10000)
 
F

FN

Evertjan. said:
FN wrote on 11 jul 2003 in comp.lang.javascript:


url="http://cnn.com/"
setTimeout("location.href=url",10000)


Thanks. And if I wanted to refresh the page, can I just specify the same
page where you wrote "url" or is there a different command for refresh?
 
E

Evertjan.

FN wrote on 12 jul 2003 in comp.lang.javascript:
Thanks. And if I wanted to refresh the page, can I just
specify the same
page where you wrote "url" or is there a different command for refresh?

"location.reload()"

or even

"location.href=location.href"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top