Random Text Display

12 posts by 3 authors in: Forums > CMS Builder
Last Post: September 17, 2009   (RSS)

Re: [chris] Random Text Display

By Chris - September 17, 2009

Hi gagester,

You must not have uploaded that file, as the line still referred to $top_rightRecord. There was also a problem with only loading a single record instead of all of them, which I should have caught before. I made a copy, in which I got everything working:

[url http://centrasodablasting.com/about-us2.php]http://centrasodablasting.com/about-us2.php[/url]

Note that your content field is a WYSIWYG, so you're getting <p> tags, which is why the text is black instead of white. This can be fixed with some CSS. Also note that it currently changes the text every 1000 milliseconds (i.e. 1 second,) and doesn't check to see if the random element it chooses is the same as the last one displayed. (That means that it's entirely possible to have the same random choice displayed over and over again.) Cycling through the entries (like sagentic is doing above) might be a good approach.

I hope this helps! Please let us know if you have any more questions. :)
All the best,
Chris