Announcement

Collapse
No announcement yet.

Generating Sections / Sub-Sections

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

    Generating Sections / Sub-Sections

    Hi,

    For the life of me i can't remember the code i put into my site to generate the sections and sub sections. Can someone post the code i need to enter.

    Cheers,
    Adam

    #2
    Are you on about the Yahoo sections by any chance?

    Comment


      #3
      I have now found what i was looking for but for some reason it is not showing the cat/sub-cats.

      I added this to the head:

      Code:
      <!--@act NETQUOTEVAR:SECTIONTREE_RAW -->
      <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
      <!--
      function SectionList(ar)
      {
      var strIDs = '<table border=0 width=95% cols=2>';
      for (var i=1;i<=ar.length;i++)
      {
      if (ar[i].sURL !=null)
      {
      strIDs += '<tr><td colspan=2><a href="' + ar[i].sURL + '"><span
      class="actxsmall">' + ar[i].sName + '</span></a></td></tr>';
      {
      if (ar[i].pChild)
      Getting Started with Design in Actinic Dynamic Section Lists • 39
      {
      for (var j=1;j<=ar[i].pChild.length;j++)
      {
      if (j <= ar[i].pChild.length)
      {
      strIDs += '<tr><td><img src=shim.gif width=5></td><td><a href="' +
      ar[i].pChild[j].sURL + '"><span class="actxxsmall">' +
      ar[i].pChild[j].sName + '</span></a></td></tr>';
      }
      }
      }
      }
      }
      }
      strIDs += '</table>'
      return strIDs
      }
      //-->
      </SCRIPT>
      Then this to where i wanted it to show:

      Code:
      <script language=Javascript1.1>
      document.write(SectionList(section_tree))
      </script>
      But nothing is generated? Have i done anything worng?

      Comment


        #4
        Hi,

        I don't think it likes the line breaks in your code and also you need to remove:

        Getting Started with Design in Actinic Dynamic Section Lists • 39

        Try using this:

        Code:
        <!--@act NETQUOTEVAR:SECTIONTREE_RAW -->
        <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
        <!--
        function SectionList(ar)
        {
        var strIDs = '<table border=0 width=95% cols=2>';
        for (var i=1;i<=ar.length;i++)
        {
        if (ar[i].sURL !=null)
        {
        strIDs += '<tr><td colspan=2><a href="' + ar[i].sURL + '"><span class="actxsmall">' + ar[i].sName + '</span></a></td></tr>';
        {
        if (ar[i].pChild)
        {
        for (var j=1;j<=ar[i].pChild.length;j++)
        {
        if (j <= ar[i].pChild.length)
        {
        strIDs += '<tr><td><img src=shim.gif width=5></td><td><a href="' + ar[i].pChild[j].sURL + '"><span class="actxxsmall">' + 
        
        ar[i].pChild[j].sName + '</span></a></td></tr>';
        }
        }
        }
        }
        }
        }
        strIDs += '</table>'
        return strIDs
        }
        //-->
        </SCRIPT>
        ********************
        Tracey
        SellerDeck

        Comment

        Working...
        X