Announcement

Collapse
No announcement yet.

Creating Yahoo-style section list in brochure pages

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

    Creating Yahoo-style section list in brochure pages

    I'm trying to add the Yahoo-style section list in Act_BrochurePrimary.html, and I can only get the top levels to show, not the second levels.

    The code before </HEAD> is as follows:

    Code:
    <LINK REL=STYLESHEET HREF="actinic.css">
    <SCRIPT LANGUAGE="JavaScript" SRC="actiniccore.js" TYPE="text/javascript"></SCRIPT>
    <SCRIPT LANGUAGE="JavaScript" SRC="actinicextras.js" TYPE="text/javascript"></SCRIPT>
    <SCRIPT LANGUAGE="JavaScript" SRC="Act_sections.js" TYPE="text/javascript"></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="actxsmall"><b>' + ar[i].sName + '</b></span></a><br>';
          {
          if (ar[i].pChild)
            {
            for (var j=1;j<=ar[i].pChild.length;j++)
              {
              if (j < ar[i].pChild.length)
                {
                strIDs += '<a href="' + ar[i].pChild[j].sURL + '"><span class="actxsmall">' + ar[i].pChild[j].sName + '</span></a>, ';
                }
              else
                {
                strIDs += '<a href="' + ar[i].pChild[j].sURL + '"><span class="actxsmall">' + ar[i].pChild[j].sName + '</span></a>, ...';
                }
              }
            }
          }
        strIDs += '<br><br>'
        }
      }
    return strIDs
    }
    //-->
    </SCRIPT>
    
    </HEAD>
    I have the code...
    HTML Code:
    <script language=Javascript1.2>
    document.write(YahooSections(sections))
    </script>
    ... where I want the menu to appear.

    I originally had references to "Act_section_tree.js" and (YahooSections(section_tree)) but Actinic had generated a js file called "Act_sections.js" so I changed the references to suit.

    Any idea what I'm doing wrong and what to change?

    TIA

    Malcolm
    ¤ The world wide web needn't cost the earth
    ¤ ARTISAN INTERNET LTD
    ¤ www.artinet.co.uk

    #2
    Hi Malcolm,

    Do you have a url for us to see where this is happening? I have tested this out, and it works for me. Attach to this thread is my working version of Act_BrochurePrimary.html. It is using layout10 theme.

    Kind Regards
    Attached Files
    Nadeem Rasool
    SellerDeck Development

    Comment


      #3
      The url is http://act1.artinet.co.uk/

      I copied your main script to the <head> section, and also copied the place-holder script into the body, but it's made no difference - apart from the fact that even the top levels are not showing now!

      The main difference is that your script calls the js file "Act_section_tree.js" but this file doesn't exist in my version, mine's called "Act_sections.js", which I've referenced but that hasn't helped either.

      Unfortunately (or fortunately), the client is now pushing me to get on with the rest of the site, so I'll have to leave the Yahoo-style menu. If I can get back onto it I'll post again.

      Many thanks
      Malcolm
      ¤ The world wide web needn't cost the earth
      ¤ ARTISAN INTERNET LTD
      ¤ www.artinet.co.uk

      Comment

      Working...
      X