On Tue, Dec 1, 2009 at 4:33 AM, Michel Belleville <michel.bellevi...@gmail.com> wrote: > If I were you I wouldn't let JavaScript do the randomizing, I would do it > server-side instead, providing a request that returns a random record and > pinging it with a simple AJAX query ; this way, JavaScript doesn't need to > be aware of what you want to send and it doesn't select the id client-side > (without the database nearby).
I agree with Michel. Keep the javascript a simple request with no params and let the server script (or even the DB) do the randomising.