Randomiser code
2 posters
Page 1 of 1
Randomiser code
<div id="randimg" style="width:float;">
<SCRIPT LANGUAGE="Javascript">
function banner() { } ; b = new banner() ; n = 0
b[n++]= "<A HREF='http://padrewa.com/' ><IMG name=randimg SRC='https://farm8.staticflickr.com/7300/9267502045_182099af29_b.jpg' border='0' ALT='Banner1'></A>"
b[n++]= "<A HREF='http://padrewa.com/'><IMG name=randimg SRC='https://farm3.staticflickr.com/2812/9270288754_d406240412_b.jpg' border='0' ALT='Banner2'></A>"
b[n++]= "<A HREF='http://padrewa.com/'><IMG name=randimg SRC='https://farm6.staticflickr.com/5329/9267511917_22077a0905_b.jpg' border='0' ALT='Banner2'></A>"
b[n++]= "<A HREF='http://padrewa.com/'><IMG name=randimg SRC='https://farm3.staticflickr.com/2835/9270308346_1ecdaa2fbe_b.jpg' border='0' ALT='Banner2'></A>"
b[n++]= "<A HREF='http://padrewa.com/'><IMG name=randimg SRC='https://farm6.staticflickr.com/5335/9270302010_8f7c1ffd53_b.jpg' border='0' ALT='Banner3'></A>"
i=Math.floor(Math.random() * n) ;
document.write( b[i] )
</SCRIPT>
</div>
<SCRIPT LANGUAGE="Javascript">
function banner() { } ; b = new banner() ; n = 0
b[n++]= "<A HREF='http://padrewa.com/' ><IMG name=randimg SRC='https://farm8.staticflickr.com/7300/9267502045_182099af29_b.jpg' border='0' ALT='Banner1'></A>"
b[n++]= "<A HREF='http://padrewa.com/'><IMG name=randimg SRC='https://farm3.staticflickr.com/2812/9270288754_d406240412_b.jpg' border='0' ALT='Banner2'></A>"
b[n++]= "<A HREF='http://padrewa.com/'><IMG name=randimg SRC='https://farm6.staticflickr.com/5329/9267511917_22077a0905_b.jpg' border='0' ALT='Banner2'></A>"
b[n++]= "<A HREF='http://padrewa.com/'><IMG name=randimg SRC='https://farm3.staticflickr.com/2835/9270308346_1ecdaa2fbe_b.jpg' border='0' ALT='Banner2'></A>"
b[n++]= "<A HREF='http://padrewa.com/'><IMG name=randimg SRC='https://farm6.staticflickr.com/5335/9270302010_8f7c1ffd53_b.jpg' border='0' ALT='Banner3'></A>"
i=Math.floor(Math.random() * n) ;
document.write( b[i] )
</SCRIPT>
</div>
fawnlemur- Posts : 1
Join date : 2014-12-24
Re: Randomiser code
Thanks for this. I've used it as the basis of the new "Random Card" widget, loading a new random card on page load. This replaces the previous widget which utilized some heavy script and off-site resources that were inconsistent, resulting in intermittently slow loading pages. With the new script, everything is nice and zippy as it should be. Thanks again, see you in chat for some Star Realms
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Sun Dec 11, 2016 12:49 am by Smakx
» Colt Express Digital Version Game Play Videos
Sat Nov 19, 2016 7:15 pm by Smakx
» Duel Generation - Decks to build without premium - Suggestions ?
Mon Oct 10, 2016 1:19 pm by Evil Panda
» Yu-Gi-Oh DUEL LINKS - Closed Beta Signup and Game Play Video
Tue Jun 28, 2016 4:40 pm by Smakx
» Castles of Mad King Ludwig
Wed Jun 22, 2016 12:52 pm by Smakx
» Twilight Struggle
Thu Jun 09, 2016 4:05 pm by Smakx
» The Outer Gods (Cthulhu Mythos) Video
Mon May 23, 2016 12:07 am by Smakx
» Cthulhu Realms
Thu May 19, 2016 1:08 pm by Smakx
» Pathfinder Adventures
Wed May 04, 2016 2:15 pm by Smakx
» Magic The Gathering Documentaries
Tue May 03, 2016 3:18 pm by Smakx
» Chronicle: RuneScape Legends Open Beta Has Begun
Thu Mar 24, 2016 3:31 pm by Smakx
» r/digitalccg - The Digital CCG Subreddit
Tue Mar 22, 2016 4:45 pm by Smakx
» Grim Dawn ARPG
Tue Mar 22, 2016 2:42 pm by Smakx
» Patchwork The Game
Wed Mar 09, 2016 2:53 pm by Smakx
» Star Realms Digitial - Crisis Events Expansion Released
Tue Mar 08, 2016 12:19 pm by Smakx
» Puzzle Strike
Mon Mar 07, 2016 1:00 pm by Smakx
» New to the Forums? - Introduce Yourself
Thu Feb 25, 2016 6:56 pm by hamvvar
» Cardfight!! Online
Fri Feb 05, 2016 3:10 pm by Smakx
» Tsuro - The Game of the Path
Thu Feb 04, 2016 12:55 pm by Smakx
» Spellweaver
Wed Feb 03, 2016 12:56 pm by Smakx
» The Manhattan Project
Tue Feb 02, 2016 12:42 pm by Smakx
» Yugioh - DrFaker's 「Prototype」 Performopal Psychics Preview
Sun Jan 31, 2016 4:40 pm by Smakx
» Sentinels of the Multiverse - Digital Edition
Mon Jan 25, 2016 2:58 pm by Smakx
» Exploding Kittens
Fri Jan 22, 2016 11:03 am by Smakx