
Okay, I know this is pretty basic but I just can't seem to recall how to do it. I have a dynamic form that is generating text and number sequences for field names. What I need to do is take the number(s) generated and combine them with the text to form a complete field name. Yes, text and numbers [math] are different so I keep getting NaN errors. How do I get the number characters FROM math TO text?
Here is my code. An example of the output I am seeking is something like 'linkname1', 'linkname2', etc.
- Code: Select all
for(i = 0; i < num; i ++){
var linkname = document.linkform.linkname+i.value;
alert(linkname);
}
Any help would be greatly appreciated.