Forum Moderators: open

Message Too Old, No Replies

Javascript Link Timer

Will click the link after 30 seconds

         

wfernley

7:25 pm on Jul 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello, I need to create a script that will automatically click a link after 30 seconds on one of my website pages. Is this possible?

Thanks :)

Wes

rocknbil

7:59 pm on Jul 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You need a hand or a finger to "click," but you can emulate the click:

<body onLoad="setTimeout('5000','document.location=http://www.example.com');">
<a href="http://www.example.com">If you don't click here in five seconds, we're sending you there anyway</a>

May need to tweak a quotemark or two, untested

wfernley

8:21 pm on Jul 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Great thank you for the reply. Is there a way to target a frame in the javascript too?

JAB Creations

2:54 am on Jul 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




parent.mynameisframe.location="youhavelostcontrol.html";

wfernley

1:00 pm on Jul 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Jab, I will be testing this today :)

wfernley

3:49 pm on Aug 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello again,

I finally got to test this (almost a month later ;)) got sidetracked with getting married....anyways I tried it and it didn't work. Does anyone have any other ideas?

Thanks :)