View Full Version : Random Content Rotation Made Easy!

02-26-2008, 07:28 PM

Anyone used this? The article is somewhat clear but not entirely. As a result, I'm having issues... the idea, though, is straight forward. You have however many <DIV>'s and the PERL script random allows only one to be shown, hence random content.

However, all I'm seeing in my tests are the contents of all three <DIV>'s. My host (GoDaddy) supports Perl. Perl script is installed in CGI directory (GoDaddy doesn't allow cgi-bin). Path to file has been updated accordingly. I have execute permissions on. I haven't touched any of the default settings provided by the author besides the path.

I thought this was straight forward. :(


02-26-2008, 09:19 PM
Your cgi isn't running - you can tell by trying to trigger it from the browser:

Internal server error - probably a permissions issue on the file or the apache setup, check w/your web host.

That said there's no reason you have to do this with perl - it'd be easy enough to do w/javascript. Just set all the divs to display:none in your css file, then use javascript to pick one randlomly and set to "display: block" to make it visible. That's essentially what the perl script was doing by sending/not sending different CSS.