...

View Full Version : Need help with Random Html



RIKaSHaY7486
05-07-2006, 05:08 AM
Ok i made this code as a news thing for my website


<SCRIPT LANGUAGE="JavaScript">

var randomness = new Array(4)
randomness[0] = 'Soul P. Signs With Beatmart.<br><a href="http://www.beatmart.com/site.php?em576=57753_0__0_~0_-1_5_2006_0_0&content=news">Click Here To Read More</a>';
randomness[1] = 'KJ-52 Has an Official Myspace Page "No Joke Its From the man himself"<br> <a href="www.myspace.com/kj52">Click Here To See</a>';
randomness[2] = 'Trip Lee to release debut album May 30th<br><a href="http://reachrecords.com/artists.php?id=3&sID=42">Click Here For More Info</a>';
randomness[3] = 'The Cross Movement To Realese Chronicles (Greatest Hits, Vol. 1) Aug. 22, 2006<br><a href="http://www.crossmovementrecords.com/articles_view.asp?articleid=21726&columnid=1089">Click Here For More Info</a>';

var a = Math.floor(Math.random() * randomness.length)

document.write(randomness[a]);

</SCRIPT>

When i tested it it would start with one line of news but when i reloaded it it would put two lines of news. What is wrong with this?

Philip M
05-07-2006, 08:36 AM
Works fine for me in IE5.5.

RIKaSHaY7486
05-08-2006, 12:01 AM
Really well i use firefox, or maybe it could be the testing board i use. I use Zoicks html practice



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum