Announcement

Collapse
No announcement yet.

New image in Sct_Primary when screen refreshed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    New image in Sct_Primary when screen refreshed

    Hello

    3rd time I have tried to ask this question, i need some sleep!

    Is it possible to build in the function within Act_Primary so that when a customer moves to another Act_Primary page, the part of a page that has an image on it is substituded for another image.

    On my site, I have an image (say 800 by 100) that appears on ever screen, currently it is the same trhough out. I would like to change this randomly as a customer navigates my site, only with 5 or 6 images in all.

    I am not looking for banner ads per se, but just something to make it graphcially more interesting, with the ability to use the space as a 'Limited available' campaign for example (based on a static image).

    I am conscious of loading times and think (!) that one of the quickest ways to do this would be to have static images.

    Is this possible.

    My site address if you want to see an example of what I mean (sorry Chris, you must have seen this so many times now) is http://www.fidelitydj.co.uk/acatalog/store_newin.html

    Thanks
    Steve

    #2
    I guess you need some kind of JavaScript function that will cycle though images one after the other. This is rather outside of the realms of what Actinic can do - but you could plug some custom code into your Act_Primary.html template to do it.

    Comment


      #3
      If you replace your image tag with

      Code:
      <script language=JavaScript>
      <!-- 
      document.write('<img width=800 height=100 src="logo' + (Math.floor(Math.random()*5 - 0.01) + 1) + '.jpg">');
      // -->
      </script>
      Then this will load an image logo1.jpg to logo5.jpg at random. Change the 5 above if you want more images.

      Norman
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Hi Chirs/Norman

        Thanks for that.

        All in now. Personally, I feel that it adds a dynamic feel to the static pages, thanks both to your recent help (on so many things).

        Now that I have this function, I can add/remove banners as required, if I have a new release, I can promo it on the site to build interest, mark any special news, or just, well what ever really. Really pleased with it.

        Thanks again

        Steve.

        Comment


          #5
          Looks great. The random feature works well. Those images are only 5 - 6K so they shouldn't hurt too much.

          Norman

          PS Wow! A highly Normanised site! NorCascade, Random images, Cart Button on pop-up's, etc.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Norman

            Yes, I hold my hands up, your comments and advice have really helped (and i know nothing about coding, i just have an obsession of learning more and subsequently end up to the early hours (trying to hold a day job too) making mistakes and then moving on, kinda fun tho).

            Pretty pleased with where I am out, i was going to publish my address to friends tonight to help test but now have another thought about music downloads, thought i had it covered but alas...

            I am sure tho that if i did this again i could do it in a quarter of a time, yes, that is a LOT of mistakes!!.

            Cheers Norman

            Steven

            Comment

            Working...
            X