I'm looking for a snippet of code that would let me generate testimonials, quotes or any string value randomly on a webpage. I would like for it be standards compliant, XML based(meaning I would store the testimonials in an xml file), and the less obtrusive it is, the better.
Where could I download such a thing or is there an example out there? I pretty much googled around, but had no luck. Also, I tried modifying the Ajax Ticker seen here:
If you want to attempt to solve this on your own instead of providing me a link, here's what I got:
inside that "rotate()" function, I have code similar to this:
var randomizeMessage= xmldata
var randomizedTicker = math.random(randomizeMessage)
document.getElementById("testimonials").innerHTML = randomizedTicker
Any idea how I could load what's inside a class called "message" (which would be in a external xml file) into a webpage randomly?