PDA

View Full Version : :: Random Content Script Doesnt work ::



Nigel
06-19-2002, 04:35 PM
Im using this script for random content
<script language="JavaScript">
<!--

/*
Random Content Script- By JavaScript Kit(http://www.javascriptkit.com)
Over 200+ free JavaScripts here!
*/

function random_content(){
var mycontent=new Array()
//specify random content below.
mycontent[1]='Wind Whispers violent threats<br>shivering soul, their desires in debt<br>hells grasp on my soul and mind<br>Satan's intentions are not kind<br>Heaven's glory doesn't remain<br>inside my mind I'm going insane<br>my silent scream, with on sound<br>To hell's gate is where I'm bound'
mycontent[2]='content'
mycontent[3]='content'
mycontent[4]='content'
mycontent[5]='content'


var ry=Math.floor(Math.random()*mycontent.length)
if (ry==0)
ry=1
document.write(mycontent[ry])
}
random_content()
//-->
</script>

and i have the first conent all on one line but it doesnt show up, nothing does, when i shorten it(like take away 90%) it works

i need a script where i can add as much as i want

help!

thanks
n

RoyW
06-19-2002, 04:49 PM
Try using double quotes for the messages.

mycontent[1]="Wind Whispers violent threats<br>shivering soul, their desires in debt<br>hells grasp on my soul and mind<br>Satan's intentions are not kind<br>Heaven's glory doesn't remain<br>inside my mind I'm going insane<br>my silent scream, with on sound<br>To hell's gate is where I'm bound";
mycontent[2]="content";
mycontent[3]="content";
mycontent[4]="content";
mycontent[5]="content";

Nigel
06-19-2002, 06:07 PM
thanks!