Sorry I should have explained it better. My php will get the record. I just need help using jquery to get the record every (set time, 60 seconds 120 seconds or when the user clicks next)
Basically I want to add a side module to the page which has recent posts with a avatar of the person who made the post and a brief dscription of the post and a link to the post. This will change every ("set time" automaticaly or if the user clicks next it will pull another random record) I just need some help with the function to request a new record via ajax every xxx time or when user clicks next. I can pull a random record no problem with $ajax and load it into my area I need, just telling the script to get a new record duration is where im stuck. Sorry and thanks, Dave -----Original Message----- From: brian [mailto:zijn.digi...@gmail.com] Sent: December-01-09 2:45 PM To: jquery-en@googlegroups.com Subject: Re: [jQuery] get random record? 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. No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.709 / Virus Database: 270.14.83/2526 - Release Date: 12/01/09 04:29:00