1 Reply Latest reply on Feb 1, 2018 9:25 AM by Thom Parker

    Generating a Random number

    berts74981696 Level 1

      I am completely new at javascript and I don't know all the terminology so it might take some dumbing down in response. I am attempting to generate a random number between 0 and 1 so I would like it to look like .1234 or .9999. It has to be four digits and I don't necessarily need it to lock once entered. I would only need to print that page and hit my radio button and generate a new list of numbers. I currently have this as my script.


      this.getField("Text1").value =



      The "Text1" is the current name for the box on my test page and I am using a radio button to generate the number. I will also have multiple boxes that I want random numbers generated in and I would like to use one radio button to complete the task of generating all the random numbers that I would need. How would I also add, say "text2, text3, text4", boxes to this so that all of them would have a separate random number or do I have to enter a script to each "text" box to do this.