Announcement

Collapse
No announcement yet.

Javascript not working

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

    Javascript not working

    Ive been trying to get a bulleted list of sections (and subsections) that will take customers direct to products, to appear on my pages.

    I have used the instructions and code in the Actinic advanced guide but it doesnt appear.
    This is the code i put in head section

    <!--@act NETQUOTEVAR:SECTIONTREE_RAW -->
    and this is the code i put in the table cells i wanted the bulleted list to appear

    <SCRIPT LANGUAGE = JavaScript>
    <!--
    function Recurse(pItem) {
    for (var i = 1; i <= pItem.length; i++) {
    document.write("<UL>");
    document.write("<LI>");
    document.writeln(pItem[i].sName.link(pItem[i].sURL));
    document.write("</LI>");
    if (pItem[i].pChild)
    {
    Recurse(pItem[i].pChild);
    }
    document.write("</UL>");
    }
    }
    Recurse(section_tree);
    -->
    </script>
    Can anybody help me out?

    #2
    The line

    -->

    is usually

    //-->

    If that deosn't fix it then look at your page with Firefox ( www.mozilla.org ) and turn on Tools / JavaScript console. You get good error messages then.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      that didnt work unfortunatly, Firefox see's the error but only tells me the line number, cant see whats wrong with the script looks ok to me.

      Comment


        #4
        If you click on the line that Firefox reports then it should open in a text editor with the error highlighted.

        If you have an URL that we can see that would help.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Thanks for your help Norman, my URL is http://www.intouchmobile.co.uk/acatalog/index.html

          Comment


            #6
            EDIT: seems to be working in Firefox but not in IE.

            Comment


              #7
              It seems to be related the the Image paths in the generated Section_tree.js

              e.g.

              section_tree[1].sImage = "Images\Samsung\samsung_A800.jpg";
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                All i really want is a list with sections and subsections. Its bothering me why it works in Firefox and not in IE.
                Every time a get a step closer it seems to get further away.
                Im not very familiar with Javascript, although it looks simialr to java, I still seem to struggle to get my head round it.

                Comment


                  #9
                  These image entries are wrong. All your files SHOULD be in the acatalog directory on the server. I'm not sure why you're generating such strange entries.
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment


                    #10
                    web sites arent my thing, im a network eng.
                    So i should change the location of the images to the acatalog directory and change the refererences to that location within actinic.
                    Also, any idea why that javascript doesnt work in IE.

                    Comment


                      #11
                      What version of Actinic are you using? What you are getting there is a bug which was fixed in later versions of Actinic v6 (I think it was fixed in 6.1.4). I suggest an upgrade.

                      Comment


                        #12
                        Im using 6.1.3, thanks, i'll patch it. Upgarding wont affect the contents or the custom templates will it?

                        Comment


                          #13
                          No - there are no template changes between 6.1.3 and 6.1.5

                          Comment

                          Working...
                          X