/    Sign up×
Community /Pin to ProfileBookmark

Choosing random Links and displaying them

Ok, ive got a site that you can add your site to and want to add a script that chooses a random Link from a list i type in the code.

Like this:

Page A (href=””)
Page B (href=””)
Page C (href=””)

it chooses one of them and displays it in a table or something like that.

? Hope you have got a script.

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@xataku_nakusuteJul 27.2003 — do you want the different link to display completely randomly, or according to the date, time, etc?





::you may want to look into javascript for this::
Copy linkTweet thisAlerts:
@David_HarrisonJul 27.2003 — You mean like this:

[upl-file uuid=6ef17b62-ab6f-42e2-8233-4e13816d0114 size=700B]random link.txt[/upl-file]
Copy linkTweet thisAlerts:
@aoeguyauthorJul 28.2003 — Thanks Lavalamp,

It works well, but how could i change the document.write code to add the link into a table? Would i just add a table onto the page and move the JS Code?

Aoeguy
Copy linkTweet thisAlerts:
@David_HarrisonJul 30.2003 — Simple, wherever you want the link, instead of putting a link, just put this:

<script type="text/javascript"><!--

create_random_link();

//--></script>
×

Success!

Help @aoeguy 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.25,
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,
)...