The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Link with timer
dunno
post Apr 15 2012, 06:55 PM
Post #1





Group: Members
Posts: 2
Joined: 15-April 12
Member No.: 16,915



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 :)!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Apr 15 2012, 07:11 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Nope, it can't. But it can be done with JavaScript. Look up setTimeout() .
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Apr 15 2012, 08:12 PM
Post #3


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Apr 15 2012, 11:19 PM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



I would do that in less than 10 seconds. Still, it can be done and maybe something else is happening while we wait
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
dunno
post Apr 16 2012, 10:56 AM
Post #5





Group: Members
Posts: 2
Joined: 15-April 12
Member No.: 16,915



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 16th April 2024 - 02:52 PM