Announcement

Collapse
No announcement yet.

Javascript for Section Images doesn't display image

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

    Javascript for Section Images doesn't display image

    Hi

    I tried the List of Section Images with Javascript on p44 of the Advanced guide. It works except the Section image is not displayed - just a broken image. There is definitely a section image on the site as it can be seen if I navigate from the Top Level Section menu. Any ideas? I've triple checked the code.

    You can try the URL: http://www.fsinteriors.co.uk

    The code is running below the new products section. THe first image is a link to the study/office.

    The guide is excellent though.

    Cheers

    Mark
    Last edited by mmoranuk; 07-Sep-2006, 11:42 AM. Reason: missed a bit about where to look on the page

    #2
    Here is the code I used if it helps:
    Code:
       <actinic:variable value="All Data From Top Level Sections" name="JavaScriptArray"/>
       
       <script language=JavaScript>
    		<!-- 
    			function ImageList(pItem)
    		{
    		var strIDs = '';
    			{
    			for (var i = 1; i <= pItem.length; i++)
    				{
    				strIDs += '<a href=' + pItem[i].sURL + '><img src="' + pItem[i].sImage + '" alt="'+ pItem[i].sName + '" width=' + pItem[i].nImageWidth + ' height=' + pItem[i].nImageHeight + ' border=0></a><br>';
    				}
    			}
    		return strIDs
    		}
    		-->
    	</script>
    Along with this code to call it:
    Code:
    	<script language=Javascript1.2>
    		document.write(ImageList(sections))
    	</script>

    Comment


      #3
      That page is the home page of the site. The images are in acatalog. You'll need to detect that and prefix acatalog/ to the image name.

      All other pages come from acatalog and the prefix won't be needed.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Doh! I can't believe it was that obvious. Works fine now...

        I'm new to Actinic and I thought I had cracked it but obviously I have a bit further to go :-)

        Thanks.

        Mark

        Comment


          #5
          Does any1 know how to make the images rollovers once you have followed the above procedure

          Comment


            #6
            There's only one image per Section entry so there's no alternative image to rollover to.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment

            Working...
            X