By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,574 Members | 1,459 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,574 IT Pros & Developers. It's quick & easy.

Help with script

P: n/a
BDJ
Hello group. I am not a programmer so any help is appreciated. I would like
to generate a random set of letters from a specific list each time a web
page is loaded. For example, from the following list of letters, E T W K S O
Y A, I would like to display a total of 50 letters. Also, this list will
increase as new letters are added, but only 50 will be displayed at a time.
I will use the random results to copy and past into a Word document. I
thought this would be the easiest way to go. Like I said, I know absolutely
nothing about programming and any of your help is very appreciated. Thank
you in advance.
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Lee
BDJ said:

Hello group. I am not a programmer so any help is appreciated. I would like
to generate a random set of letters from a specific list each time a web
page is loaded. For example, from the following list of letters, E T W K S O
Y A, I would like to display a total of 50 letters. Also, this list will
increase as new letters are added, but only 50 will be displayed at a time.
I will use the random results to copy and past into a Word document. I
thought this would be the easiest way to go. Like I said, I know absolutely
nothing about programming and any of your help is very appreciated. Thank
you in advance.

<html>
<body>
<script type="text/javascript">
var myList="ETWKSOYA";
var string="";
for(var i=0;i<50;i++){
string+=myList.charAt(Math.floor(Math.random()*myL ist.length));
}
document.write(string);
</script>
</body>
</html>

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.