Announcement

Collapse
No announcement yet.

menu on index page

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

    menu on index page

    I would like to have the menu on the main index page, the one prior to entering the actual catalog. I have tried the following script placed in the HEAD section:

    </script>
    <script language="JavaScript" type="text/javascript">
    <!--
    function YahooSections(ar)
    {
    var strIDs = '';
    for (var i=1;i<=ar.length;i++)
    {
    if (ar[i].sURL != null)
    {
    strIDs += '<a href="' + ar[i].sURL + '"><span class="actxxsmall"><b><font color="#105287">' + ar[i].sName + '</font></b></span></a><br>';
    {
    if (ar[i].pChild)
    {
    for (var j=1;j<=ar[i].pChild.length;j++)
    {
    if (ar[i].pChild[j].sURL != null)
    {
    strIDs += '<a href="' + ar[i].pChild[j].sURL + '"><span class="actxxsmall"><font color="#105287">' + ar[i].pChild[j].sName + '</font></span></a><br>';
    }
    }
    }
    }
    strIDs += '<br>'
    }
    }
    return strIDs
    }
    function MM_openBrWindow(theURL,winName,features) { //v2.0
    window.open(theURL,winName,features);
    }
    //-->
    </script>


    With the following script in the position that i want the menu:

    <script language="Javascript1.2">
    document.write(YahooSections(section_tree))
    </script>


    But to no avail. I am obviously doing something wrong as i get a message stating that the page has loaded, but with errors.

    Please help.

    Thanks

    Phil

    #2
    Hi Phil,

    I compared your JavaScript with the one in Advanced User Guide V6 (Creating Yahoo-style section lists) and found some differences. That may be the reason why you are getting error while loading.

    Please copy and paste the original JavaScript code from Page No. 41 of Advanced User Guide V6

    Hope this helps.

    Cheers,
    Cheers,
    Suresh Babu G

    Comment

    Working...
    X