Forum Moderators: open
the code is:
<SCRIPT>
quote1="quote1"
.
.
.
quote30="quote30"
today2=new Date()
len=3
today=today2.getTime( )/10
rnd=today%len
document.writeln(eval("quote"+rnd))
-->
</SCRIPT>
it keeps showing the first two quotes or nothing (out of 30). i wonder if anyone can help me, please!
is it possible to set a range to the script? say randomly pick from quote10 to quote20 or i can expand it later and so on.
i appreciate if anyone can give me a little help, thanks!
Something like.
<SCRIPT>
quote1="quote1"
.
.
.
quote30="quote30"
var myRandom = Math.floor(Math.random()*31)
document.write(eval("quote"+myRandom))
-->
</SCRIPT>
multiplying the random number by 31 gives a value between 0 and 30.
You can manipulate this to give values between 10 and 20..
Ally