PDA

View Full Version : yahoo section tree


simbo
24-Feb-2007, 04:49 PM
im trying to put a little arrow in front of each section here, cant find the correct place outside the a tag with no knowlage of js. can some one please point out the correct position.

<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="red10"><b>' + ar[i].sName + '</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"><strong><font color="NETQUOTEVAR:FGCOLORCSS"><br>&nbsp;<img src="tinyarrow.gif" border="0">&nbsp;' + ar[i].pChild[j].sName + '</font></strong></span></a><br>';
}
}
}
}
strIDs += '<br>'
}
}
return strIDs
}
//-->
</script>

simbo
24-Feb-2007, 05:26 PM
this section of the script

{
strIDs += '<a href="' + ar[i].pChild[j].sURL + '"><span class="actxxsmall"><strong><font color="NETQUOTEVAR:FGCOLORCSS"><br> <img src="tinyarrow.gif" border="0">' + ar[i].pChild[j].sName + '</font></strong></span></a><br>';
}

taken out the two &nsbp's and putt extra padding on my image left and right, displays fine offline does not underline image even though within <a>tag it was the spaces that were creating an ugly underline on hover, but the image is missing when viewed live.
did load image into additional files list.

I-CC
24-Feb-2007, 05:28 PM
Is it it works on the sections (inside the acatalog folder) but not on the home page maybe.

We used to have this issue, so used a different brochure template for the home page and always back referenced to the acatalog folder for the image in the JS code, like: ../acatalog/image-name.jpg etc etc

simbo
24-Feb-2007, 06:42 PM
i did not need to change broucher template, just needed to reference the image as you said acatalog/image.gif instead of just image.gif.
thanks again i think this one adds a better look to the tree.

update: only need the acatalog reference for broucher pages..!

simbo
25-Feb-2007, 02:22 PM
set the image and referenced it acatalog/image.gif in the template that is used for the home page, did not need the acatalog ref: for catalog pages eg:primary checkout and cart templates.

i was under the distinct impresion that the other broucher pages used the same template as the home page, indeed the layout's are selected to use parent.
therefor the image in question is being referenced for these pages acatalog/image.gif and does not display...?

cant understand why one broucher page would need the additional path to file and not the other.

I-CC
25-Feb-2007, 02:35 PM
That is because the home page resides at the root of the public html area and the other brochure pages all reside within the acatalog folder (2 distinct different end locations).