Help with script

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • BDJ

    Help with script

    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.


  • Lee

    #2
    Re: Help with script

    BDJ said:[color=blue]
    >
    >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.[/color]


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

    Comment

    Working...