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 misunderstanding something... I was using
element.setAttribute 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.setAttribute('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.getElementById("pgallery");
galholder = document.createElement("div");
galholder.className = "galleries";
for ( i = 0; i < gallerylist.length; i++ )
{
nd = document.createElement("a");
nd.className = "media";
nd.style.cursor = "pointer";
addClick(nd, i);
text = document.createTextNode(gallerylist[i][1]);
nd.appendChild(text);
galholder.appendChild(nd);
}
obj.appendChild(galholder);
spacer = document.createElement("div");
spacer.className = "picspacer";
obj.appendChild(spacer);
}