Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Rotator Script Problems  (Read 3130 times)

0 Members and 1 Guest are viewing this topic.

eonbar

    Topic Starter


    Newbie

    Rotator Script Problems
    « on: May 03, 2008, 07:03:51 PM »
    rite, im new here, but i did do a search and nothing came up...  ??? ::)

    Im not great at all this computer talk, so i'll need to be guided through.

    Im using dreamweaver, and i hve a site all up, yaadaahyaahdaah ...ultimatly its all good.

    i have a Rollover image, and what i would like is that which i click on it ... it take you to a random page (from a list of 20ish preselected URLs)

    i have a look on internet and it was saying something about Rotator Script.

    i have no idea what they are going on about? :-[ :P ??? :(
    how dod i do what i wana do?

    thanks guys :)

    Astoria



      Intermediate

      Re: Rotator Script Problems
      « Reply #1 on: May 04, 2008, 09:00:01 AM »
      if you have knowledge of PHP you could use the "rand" function, something like this:

      Code: [Select]
      <?php
      $num
      =rand(1,20);

      if(
      $num=="1") {
      echo 
      "<a href=\"http://www.site1.com\"><img src=\"image1.jpg\"></a>";
      }
      elseif(
      $num=="2") {
      echo 
      "<a href=\"http://www.site2.com\"><img src=\"image2.jpg\"></a>";
      }
      elseif(
      $num=="3") {
      echo 
      "<a href=\"http://www.site3.com\"><img src=\"image3.jpg\"></a>";
      }

      etc
      etc
      ?>




      eonbar

        Topic Starter


        Newbie

        Re: Rotator Script Problems
        « Reply #2 on: May 04, 2008, 10:49:54 AM »
        thanks for the reply.
        unfortunatly i have no idea about PHP although i have heard it a lot when researching how to do this ....

        dont suppose there is a set-by-step guide tht you could give me ?

        Astoria



          Intermediate

          Re: Rotator Script Problems
          « Reply #3 on: May 04, 2008, 12:45:25 PM »
          thanks for the reply.
          unfortunatly i have no idea about PHP although i have heard it a lot when researching how to do this ....

          dont suppose there is a set-by-step guide tht you could give me ?

          Not if you're unfamilair with PHP, sorry.

          If you're serious about web design you may want to try an online PHP tutoria. Trust me, it's really not that hard.



          michaewlewis



            Intermediate
          • Thanked: 26
            • Yes
            • Yes
          • Experience: Expert
          • OS: Unknown
          Re: Rotator Script Problems
          « Reply #4 on: May 06, 2008, 12:07:35 PM »
          would something like this work? http://www.dynamicdrive.com/dynamicindex14/flexislide.htm
          if it would work, you can add a function into the script to randomize it.

          If you're just wanting a random text link, that's easy enough to do with a javascript. I've got a script I made a few years back that does that.