On Sep 26, 11:47 am, Terry <w...@rogers.com> wrote:
> I will have to try to alter my function a little.
I altered my function to not include objects other than strings and
numbers.
I am still having the problem with z being equal to -1 though
My code has been changed to:
function f(divs,biterator,piterator,ziterator)
{
var d;
//alert("z = " + ziterator);
alert("a length = " + a[7].length);
for (d=0; d < a[ziterator].length;d++)
{
divs[piterator*6+(a[ziterator][d])].style.backgroundImage =
"url(images/greendot.gif)";
//if (piterator > 0)
// divs[(piterator-1)*6+(a[ziterator][d])].style.backgroundImage
= "url(images/graydot.gif)";
}
}
function animator()
{
var b,z,p,t;
var thedivs =
document.getElementById('A').getElementsByTagName( 'div');
alert("thedivs count = " + thedivs.length);
t=0;
for (b=0,z=7;b<8;b++,z--)
for (p=0; p <= z; p++)
setTimeout(function() {f(thedivs,b,p,z);},p*50)
}
The url to the page is
http://theamazing.onlinewebshop.net/newanimate.htm
Terry