Announcement

Collapse
No announcement yet.

Menu List

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

    Menu List

    Hi,

    I have put the following code on my page to display a list of links/sections

    <script language=Javascript1.1>document.write(SectionList(section_tree))
    </script>

    How do I change the colour, I know its a basic Javascript Question, but I am new to it.

    Any help Appreciated,
    Thanks,
    Rob

    #2
    But there is no HTML HREF, where I place document.write(SectionList(section_tree))
    it list the sections and a link, from this predefined function in the head section..

    <actinic:variable value="All Data From All Sections" name="JavaScriptArray" />

    <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="actxxsmall">' + 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>

    Comment


      #3
      You've got two <a href> in this code. The second one does the child sections. You can add a style.
      Peblaco

      Comment


        #4
        thanks,

        I get you now!

        Rob

        Comment

        Working...
        X