This is probably a very simple question to most of you but here goes:
I am trying to evaluate an expression. I have tons of <div id=””> in a template, named block##, where we loop through block 1, block 2, etc.
Each line item in the list (which contains its own div tag), can be called and I then want, in the JS function to alter the innerHTML state using the familiar id.innerHTML=’string’;
Problem is I find out I cannot use 4.innerHTML=”; it is invalid.
How do I, using a passed down integer, say 1, create using Javascript, the “phrase” block.innerHTML=”;
eval(“word”+id) doesn’t work. I get an “object” back when I use alert to see its value.
Thanks, Robert