/    Sign up×
Community /Pin to ProfileBookmark

Can somone make….

a script that I replace the URL with to start an event that would click a link every 6 minutes down a list.

ex.

say i have (cant put tags in)

<html><head><title>links</title>
</head>
<body>

<a href=”link1″>link1</a><br>
<a href=”link2″>link2</a><br>
<a href=”link3″>link3</a><br>

</body></html>

and so on…that would come out with

link1
link2
link3

I need a script that would take “Link1” and open a popup going to it’s address. then 6 minutes later goto the second link and open it in a popup. and so on.

Please help me if you can make me one. ?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@GollumDec 08.2003 — I'll start with the popping up bit...
<i>
</i>aURL =
[
"http://www.link1.com",
"http://www.link2.com",
"http://www.link3.com",
"http://www.link4.com",
...
];
var nURL = 0;

function showPopup()
{
window.open(aURL[nURL]);

nURL++;
if ( nURL &lt; aURL.length )
window.setTimeout("showPopup();",360000);
}

&lt;body onload="showPopup();"&gt;
...

NB: if you want to reuse the same window every time, just stick some name in as the second argument to window.open()

Now, I used an array litteral to specify all the urls. But if you must have them come from link tags then...
<i>
</i>function initURLs()
{
var aA = document.body.getElementsByTagName("a");
aURL = new Array;
for ( var i = 0; i &lt; aA.length; i++ )
aURL.push(aA.href);
}

&lt;body onload="initURLs(); showPopup();"&gt;
×

Success!

Help @Frostbyt3 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.15,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...