Copy link to clipboard
Copied
I am trying to make it so that any time the user presses a button in the application a different text appears in a textArea, like there are about 50 differeent phrases, and I want the app to choose a different one at random and display it in the textArea every time the button is pressed. anyone know how?
Copy link to clipboard
Copied
If i am getting this correct, its pretty straight forward as you can have all the phrases in the array collection (you can use xml) and then on mouse click event get the random index using Math.random() .