Help - Search - Members - Calendar
Full Version: Link with timer
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
dunno
Hey,

I have looked around google but couldn't find anything.. Hope somebody know answer.

So basically I have standard link from page index.html to page.html (by standard I mean <a href....)
And what I want to do is to make a timer -- when visitor clicks link, page wouldn't go there instantly but after time I have defined.

Lets imagine -- visitor clicks link and browser will wait for 10seconds and after that requests "page.html".

I'm kinda 87.455555% sure that this can't be made with HTML but ya. Any help would be appreciated :)!
pandy
Nope, it can't. But it can be done with JavaScript. Look up setTimeout() .
Darin McGrew
After 10 seconds, I would have followed some other link or closed the browser tab, so there's no way the delayed link could do anything.
pandy
I would do that in less than 10 seconds. Still, it can be done and maybe something else is happening while we wait
dunno
Thanks alot!
setTimeout() JScript did exactly what I needed :).

And don't worry... Those 10seconds wont be useless waiting time without "entertainment".

Thanks one mooar time.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.