Hi all,
I am having difficulty getting my table to display images from an array (which holds URLs to images). I used the code:
Is there anything wrong with the latter statement? Does .src work on getElementsByName?
I am having difficulty getting my table to display images from an array (which holds URLs to images). I used the code:
document.getElementByID("cell").src = array[ranNum];
where I named all my elements in the table: "cell". However, this only worked on the first "cell" because (I presume) that the getElementByID only works once. I then tried using getElementsByName, and named all of the cells with the same name, however this did not work at all. The line reads: document.getElementsByName("cell").src = array[ranNum];
Is there anything wrong with the latter statement? Does .src work on getElementsByName?
Comment