Announcement

Collapse
No announcement yet.

Problem with function YahooSections(ar) Page 58 of AUG???

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

    Problem with function YahooSections(ar) Page 58 of AUG???

    Hi There

    I am in the middle of creating a rollover type menu and am using the Advanced User Guide page 58

    'Listing Sub-Sections Within Each Main Section'

    I have used the following code in the <head> section


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

    <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 += '<li><a href="' + ar[i].sURL + '"><span class="actregular">' + ar[i].sName + '</span></a>';
    {
    if (ar[i].pChild)
    {
    strIDs += '<ul>'
    for (var j=1;j<=ar[i].pChild.length;j++)
    {
    if (j < ar[i].pChild.length)
    {
    strIDs += '<li><a href="' + ar[i].pChild[j].sURL + '"><span class="actxsmall">' + ar[i].pChild[j].sName + '</span></a></li>';
    }
    else
    {
    strIDs += '<li><a href="' + ar[i].pChild[j].sURL + '"><span class="actxsmall">' + ar[i].pChild[j].sName + '</span></a></li>...';
    }
    }
    }
    strIDs += '</ul>'
    }
    strIDs += '</li>'
    }
    }
    return strIDs
    }
    //-->
    </SCRIPT>


    and the following code where I want the menu to appear

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

    My problem is that some of the sections appear outside of my <ul></ul>

    I am most confused

    Here is the test url - http://domain2299600.sites.fasthosts...log/Books.html

    Any ideas where I might have gone wrong????

    Linz

    #2
    I would seriously recommend ditching the YahooSection way of things - this has been covered on the forum as to the cons of using this method.

    Use one of the <ul> based layout lists from something like the Executive theme which you can copy from the library and create the rollover effect nicely in CSS. This will be much lighter in weight, quicker and far preferential for the SEO.


    Bikster
    SellerDeck Designs and Responsive Themes

    Comment

    Working...
    X