Announcement

Collapse
No announcement yet.

top level sections js Scripts

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

    top level sections js Scripts

    Has anyone edited the javascript which displays top level section links and subsection links so that only the subsections are clickable?

    if so can I have the code please?

    Thanks in advance

    #2
    Disabled Top level section

    Hi there,

    Try out the following code, which shall disable all your top level section therefore only the subsections will appear as link(s) or be clickable:

    Creating a List of Hyperlinks with Sections and Two Levels of Sub-sections
    This code will lay out your sections and two levels of sub-sections within a list of hyperlinks. The sub-sections will appear indented.
    Paste the following code within the <HEAD></HEAD> tags of your Overall Layout template:

    <!--@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 += '<table><tr><td colspan=2><span class="actxxsmall">' + ar[i].sName + </span></td></tr></table>';
    {
    if (ar[i].pChild)
    {
    for (var j=1;j<=ar[i].pChild.length;j++)
    {
    strIDs += '<table><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></table>';

    {
    if (ar[i].pChild[j].pChild)
    {
    for (var k=1;k<=ar[i].pChild[j].pChild.length;k++)
    {

    strIDs += '<table><tr><td width="20"></td><td><a href="' + ar[i].pChild[j].pChild[k].sURL + '"><span class="actxxsmall">' + ar[i].pChild[j].pChild[k].sName + '</span></a></td></tr></table>';

    }
    }
    }
    }
    }
    }
    }
    }
    strIDs += '</table>'
    return strIDs
    }
    //-->
    </SCRIPT>

    and this bit to go into the main body:

    <script language=Javascript1.1>document.write(SectionList(section_tree))
    </script>
    Thank You
    Menar Khan

    Comment

    Working...
    X