Add a non breaking space inside the tag like <span>&nbsp;</span> will allow for the cell to show up. Not sure why you do not give the td an id and since it would do the same thing as your span does. Plus the ids can not repeat so in your smaple code, it is invalid since you would have multiple ids with the same value. Plus I would use "span_" + id for id since it is better than starting with a number.
Thanks for all the advice, but its still not producing output. I have simplified it quite a lot. I have got rid of the SPAN tags, got rid of loops for now. Also I have changed all the element IDs by adding an S to the front.
in the header script, and then, in the body script...
This just produces an empty table. How can I make it show the word "cow" in the cell of the table?
This message is the response to Bear Bibeault's message, the message above wasn't there as I started this message, hence this edit.
Yeh, I think you hit the nail on the head there. I'm not exactly sure how it works... Before I was printing a large table just in the body outside the script tags, and then in the header script, I was modifying its value.
Hmmm, is there a setElementById("...") function, or any other way around this.
I basically have 81 elements in the body of my html page, and it looks horrible as it is, they are all the same, except for the ID. Which is why I want to use some for loops to condense it.
Any ideas, thanks. [ February 14, 2006: Message edited by: colin shuker ]