Hi,
I have used the principle of the example at this page: http://www.javascriptkit.com/javatutors/dynamiccontent5.shtml several times quite successfully. (Thanks for the tutorials!!) I am now trying to set up a page with 12 different graphics which I wish to be able to manipulate individually. I could write <div id="dcontent1"... through <div id="dcontent12"... and use dcontent1.innerHTML=mycontent[i]; through dcontent12.innerHTML=mycontent[i]; but it seems there must be some way using variables to do the equivalent of id="dcontent+x" and dcontent+x.innerHTML=mycontent[i]; for x = 1 to 12 (excuse the crude symantics)
Any advice appreciated.
Thanks
Michael
I have used the principle of the example at this page: http://www.javascriptkit.com/javatutors/dynamiccontent5.shtml several times quite successfully. (Thanks for the tutorials!!) I am now trying to set up a page with 12 different graphics which I wish to be able to manipulate individually. I could write <div id="dcontent1"... through <div id="dcontent12"... and use dcontent1.innerHTML=mycontent[i]; through dcontent12.innerHTML=mycontent[i]; but it seems there must be some way using variables to do the equivalent of id="dcontent+x" and dcontent+x.innerHTML=mycontent[i]; for x = 1 to 12 (excuse the crude symantics)
Any advice appreciated.
Thanks
Michael
Comment