student610
01-17-2004, 02:11 AM
I have read the tutorials about using random quotes and read sample scripts but I still don't understand. This is what I have:
<HTML>
<HEAD>
<TITLE>The Mark Twain Quotes Page</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--- Hide from older browsers
function MQuote (Qnum) {
var Quote=new Array();
Quote[0]='"I smoke in moderation, only one cigar at a time."';
Quote[1]='"Be careful of reading health books, you might die of a misprint."';
Quote[2]='"Man is the only animal that blushes--or needs to."';
Quote[3]='"Clothes make the man. Naked people have little or no influence on society."';
Quote[4]='"One of the most striking differences between a cat and a lie is that a cat has only nine lives."';
return Quote[Qnum];
}
function RandInt(Rnum) {
var Rnum=Math.round(Math.random()*5);
return Value[Rnum];
}
//Stop hiding -->
</SCRIPT>
</HEAD>
<BODY TEXT="#000000" LINKS="#00FF00" BACKGROUND="Paper.gif">
<TABLE WIDTH=600 BORDER=0 CELLPADDING=5 CELLSPACING=0>
<!---Random Mark Twain Quote --->
<TR><TD BGCOLOR="#FFFFCC" COLSPAN=2 ALIGN=CENTER>
<FONT COLOR=BROWN FACE="Arial, Helvetica, Sans Serif" SIZE=2>
<SCRIPT>
<!--- Hide from older browsers
var RandValue=RandInt;
document.write(Quote);
//Stop hiding -->
</SCRIPT>
</FONT>
</TD></TR>
<TR>
<!--- Mark Twain graphic --->
<TD VALIGN=TOP ALIGN=CENTER WIDTH=230>
<IMG SRC="Twain.gif" WIDTH=200 HEIGHT=302 ALT="Mark Twain"><BR>
</TD>
<!--- Page title --->
<TD WIDTH=370 ROWSPAN=2 VALIGN=TOP>
<IMG SRC="Logo.gif">
<!--- Page description --->
<P>Mark Twain is one of our most commonly quoted authors. The words of
Mark Twain have enlivened speeches for the past century. Many a candidate
running for higher office has skewered the incumbent by quoting Twain:
"... that there is no distinctly native American criminal class except
Congress."</P>
<P>This page is dedicated to the collected works of Mark Twain, with a
special emphasis on his quotes and maxims. You can also look for
additional Mark Twain quotes at the sites listed below:</P>
<!--- Links to other Web pages --->
<IMG SRC="Button.gif"><A HREF="http://www.tarleton.edu/~schmidt/Mark_Twain.html">Mark Twain Quotations</A><BR>
<IMG SRC="Button.gif"><A HREF="http://salwen.com/mtquotes.html">The Quotable Mark Twain</A><BR>
<IMG SRC="Button.gif"><A HREF="http://www.geocities.com/CapitolHill/8156/Twain.html">Mark Twain Daily Quote</A><BR>
<IMG SRC="Button.gif"><A HREF="http://www.lib.berkeley.edu/BANC/MTP/">The Mark Twain Project</A><BR>
<IMG SRC="Button.gif"><A HREF="http://marktwain.miningco.com/library/weekly/aa080597.htm">Maxims and Misattributed Quotes</A><BR>
</TD>
</TR>
</TABLE>
<BR>
<HR>
<SCRIPT>
<!--- Hide from older browsers
//Stop hiding -->
</SCRIPT>
</BODY>
</HTML>
My problem is in the function RandInt.
Can someone please help me?
Thanks
<HTML>
<HEAD>
<TITLE>The Mark Twain Quotes Page</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--- Hide from older browsers
function MQuote (Qnum) {
var Quote=new Array();
Quote[0]='"I smoke in moderation, only one cigar at a time."';
Quote[1]='"Be careful of reading health books, you might die of a misprint."';
Quote[2]='"Man is the only animal that blushes--or needs to."';
Quote[3]='"Clothes make the man. Naked people have little or no influence on society."';
Quote[4]='"One of the most striking differences between a cat and a lie is that a cat has only nine lives."';
return Quote[Qnum];
}
function RandInt(Rnum) {
var Rnum=Math.round(Math.random()*5);
return Value[Rnum];
}
//Stop hiding -->
</SCRIPT>
</HEAD>
<BODY TEXT="#000000" LINKS="#00FF00" BACKGROUND="Paper.gif">
<TABLE WIDTH=600 BORDER=0 CELLPADDING=5 CELLSPACING=0>
<!---Random Mark Twain Quote --->
<TR><TD BGCOLOR="#FFFFCC" COLSPAN=2 ALIGN=CENTER>
<FONT COLOR=BROWN FACE="Arial, Helvetica, Sans Serif" SIZE=2>
<SCRIPT>
<!--- Hide from older browsers
var RandValue=RandInt;
document.write(Quote);
//Stop hiding -->
</SCRIPT>
</FONT>
</TD></TR>
<TR>
<!--- Mark Twain graphic --->
<TD VALIGN=TOP ALIGN=CENTER WIDTH=230>
<IMG SRC="Twain.gif" WIDTH=200 HEIGHT=302 ALT="Mark Twain"><BR>
</TD>
<!--- Page title --->
<TD WIDTH=370 ROWSPAN=2 VALIGN=TOP>
<IMG SRC="Logo.gif">
<!--- Page description --->
<P>Mark Twain is one of our most commonly quoted authors. The words of
Mark Twain have enlivened speeches for the past century. Many a candidate
running for higher office has skewered the incumbent by quoting Twain:
"... that there is no distinctly native American criminal class except
Congress."</P>
<P>This page is dedicated to the collected works of Mark Twain, with a
special emphasis on his quotes and maxims. You can also look for
additional Mark Twain quotes at the sites listed below:</P>
<!--- Links to other Web pages --->
<IMG SRC="Button.gif"><A HREF="http://www.tarleton.edu/~schmidt/Mark_Twain.html">Mark Twain Quotations</A><BR>
<IMG SRC="Button.gif"><A HREF="http://salwen.com/mtquotes.html">The Quotable Mark Twain</A><BR>
<IMG SRC="Button.gif"><A HREF="http://www.geocities.com/CapitolHill/8156/Twain.html">Mark Twain Daily Quote</A><BR>
<IMG SRC="Button.gif"><A HREF="http://www.lib.berkeley.edu/BANC/MTP/">The Mark Twain Project</A><BR>
<IMG SRC="Button.gif"><A HREF="http://marktwain.miningco.com/library/weekly/aa080597.htm">Maxims and Misattributed Quotes</A><BR>
</TD>
</TR>
</TABLE>
<BR>
<HR>
<SCRIPT>
<!--- Hide from older browsers
//Stop hiding -->
</SCRIPT>
</BODY>
</HTML>
My problem is in the function RandInt.
Can someone please help me?
Thanks