markwaldin
Technical User
I created a set of image objects using an array. I try to reference the image object's source image by using the array name and it doesn't work in IE.
For example:
test=new Array("sample1","sample2"
<img src=url name=test[0]>
.
.
.
document.test[0].src="newpicture.gif"
This statement results in an object not defined.
If on the other hand the statement is entered:
document.sample1.src="newpicture.gif" works fine.
How can I embed array variables in these property statements and make them work. All the books I have referenced have no examples using arrays.
For example:
test=new Array("sample1","sample2"
<img src=url name=test[0]>
.
.
.
document.test[0].src="newpicture.gif"
This statement results in an object not defined.
If on the other hand the statement is entered:
document.sample1.src="newpicture.gif" works fine.
How can I embed array variables in these property statements and make them work. All the books I have referenced have no examples using arrays.