Quote:
Originally Posted by emellaich
I'd think it would be pretty easy as an HTML/Web app. Say you have 100 poems. Put each on it's own web page with a next poem button.
Name each poem numerically 1.html, 2.HTML, ...
Now use javacript to select a random number from one to one hundred. Stick this into the target address for the next poem button. So the next poem might take you to:
"http:\\www.mypoems.com\" + random-number + ".html". Which might translate to:
http:\\ www.mypoems.com\56.html
|
Since the OP doesn't want a repeat of any poem until a complete run through, it is necessary to keep a list of every number used and not allow a reuse until all used, this could lead to a long hunt time after 98 poems while your random number generator generates used numbers. Better approach is a list of the 100 poems and as a number is used then delete from list and drop random number generator by one...