Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ramdom text association

Status
Not open for further replies.

effennel

Technical User
Oct 15, 2002
60
CA
Hello,

I have found a script (display ramdom text) that goes like this:

<head>
<title>Untitled Document</title>
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!--
//[avnerc@fundtech.co.il]
messArr=new Array();
messArr[0]=&quot;Message 1&quot;;
messArr[1]=&quot;Message 2&quot;;
messArr[2]=&quot;Message 3&quot;;
messArr[3]=&quot;Message 4&quot;;
num=Math.floor(4*(Math.random()));
//-->
</SCRIPT>
</head>

<body>
<script>document.write(messArr[num])</script>
</body>

Now what i would like to do is to associate 2 messages together in two different cells. The association must always be the same i.e. Message 1 with Message 101; Message 2 with Message 102; etc.

Any suggestions???

That you in advance for your time
fnl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top