I am brand-new to javascript, but after reading some tutorials online I
was able to make a dynamic HTML photo gallery in javascript. It works
fine in all browsers except IE6 (big surprise). I've been looking
around online for solutions, but the fixes I have seen don't seem to
work. I assume I am misunderstandin g something... I was using
element.setAttr ibute but have changed my code to avoid that. Here is an
example. IE6 displays the link text but doesn't do anything else--exact
same result I had by using element.setAttr ibute('name', 'value').
Any suggestions would be appreciated.
Thx,
Aaron
// scope workaround
function addClick(parent , index)
{
parent.onclick = function() { getThumbs(index ); };
}
// make a link for each gallery
function makeButtons()
{
obj = document.getEle mentById("pgall ery");
galholder = document.create Element("div");
galholder.class Name = "galleries" ;
for ( i = 0; i < gallerylist.len gth; i++ )
{
nd = document.create Element("a");
nd.className = "media";
nd.style.cursor = "pointer";
addClick(nd, i);
text = document.create TextNode(galler ylist[i][1]);
nd.appendChild( text);
galholder.appen dChild(nd);
}
obj.appendChild (galholder);
spacer = document.create Element("div");
spacer.classNam e = "picspacer" ;
obj.appendChild (spacer);
}