Rik Van Lier
asked on
scripting lottery
hi,
i am stuck with a question from a customer!
my customer wants a webpage with a button that show a random number between 0 and 4000.
but the script need to generate that numer one by one. so first click the first number, then the second number, then the thirth and then the last number.
and the total number cannot be higher then 4000.
can anyone build this for me? i need a html of php page that can do this?
i am stuck with a question from a customer!
my customer wants a webpage with a button that show a random number between 0 and 4000.
but the script need to generate that numer one by one. so first click the first number, then the second number, then the thirth and then the last number.
and the total number cannot be higher then 4000.
can anyone build this for me? i need a html of php page that can do this?
no PHP, just javascript and JQuery: fiddle
note warning re infinite loop
note warning re infinite loop
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Question inactive
If a duplicate number comes back, just call random again.
Just keep a hash of numbers returned so far in one session, so you can do fast lookups + if you ever require expanding total numbers returned, all your de-dup (duplicating) code will just continue to work, as-is.