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
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
Comment