Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Nov 2007
    Thanked 0 Times in 0 Posts

    Random Content Rotation Made Easy!


    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.

    Last edited by DrewDizzle; 02-26-2008 at 07:30 PM.

  2. #2
    New Coder
    Join Date
    Jan 2008
    Thanked 3 Times in 3 Posts
    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.
    Web hosting by coders, for coders: php hosting - Magento eCommerce hosting - perl hosting - check us out!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts