A thank you goes out to everyone who has answered so far. Here's my latest question:
I want to insert a string into a cell but the string has a variable in it. How would I do so with a string like the one below.
The letter X would be replaced with the current value of a counter variable. I think something like the following would work, but I would rather do it differently.
Secondly, I've noticed that with IE, an onclick operation can only be performed once the target has finished loading while it doesn't matter with firefox. I'm guessing this is normal and cannot be corrected in any way?
I want to insert a string into a cell but the string has a variable in it. How would I do so with a string like the one below.
Code:
innerHTML = <input type="text" name="textX" size="40" />
The letter X would be replaced with the current value of a counter variable. I think something like the following would work, but I would rather do it differently.
Code:
var element = document.createElement('input');
element.setAttribute('type', 'text');
element.setAttribute('name', 'text' + countervariable);
element.setAttribute('size', '40');
Secondly, I've noticed that with IE, an onclick operation can only be performed once the target has finished loading while it doesn't matter with firefox. I'm guessing this is normal and cannot be corrected in any way?