jake_604
08-22-2003, 08:45 AM
I have a script that displays random quotes:
<SCRIPT LANGUAGE="JavaScript">
<!--//
var quotnum = "3";
var quote = new Array(1000);
quote[0] = "Quote #1";
quote[1] = "Quote #2";
quote[2] = "Quote #3";
var arandomn=Math.random() * quotnum;
arandomn=Math.round(arandomn);
var daquote =quote[arandomn];
document.write(""+daquote+"");
//-->
</SCRIPT>
How can I edit that script to make it so that if Quote 1 is shown, when the page is refreshed, it will be either Quote 2 or 3. And when Quote 2 is displayed, when the page is refreshed either Quote 1 or 3 will be shown?
I hope someone can help me.
<SCRIPT LANGUAGE="JavaScript">
<!--//
var quotnum = "3";
var quote = new Array(1000);
quote[0] = "Quote #1";
quote[1] = "Quote #2";
quote[2] = "Quote #3";
var arandomn=Math.random() * quotnum;
arandomn=Math.round(arandomn);
var daquote =quote[arandomn];
document.write(""+daquote+"");
//-->
</SCRIPT>
How can I edit that script to make it so that if Quote 1 is shown, when the page is refreshed, it will be either Quote 2 or 3. And when Quote 2 is displayed, when the page is refreshed either Quote 1 or 3 will be shown?
I hope someone can help me.