Wayne Gregori Wayne Gregori - 1 year ago 96
Javascript Question

javascript to click a link every 5 seconds

I need a javascript routine that will click a link every n seconds until interrupted. I did find a routine that clicked a button but I don't know how to point the function to a link rather than a .button.


Answer Source

Assuming you're actually trying to click a link that doesn't navigate to another page (what you asked, I suppose), you would probably use jQuery:

var variableToCancelInterval = setInterval(function(){
}, 5000);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download