hi! 
i have a question. So here's the situation, i have an html file with a form. I have named the text inputs in the form, 'First1', 'First2', First3', .... since you don't know how many first names you can have. you can keep generating them.
Anyway, that's not my problem. In order to keep generating these inputs, I'm using javascript. So somewhere in the script i have the following:
eleInput1.setAttribute('name','First' + cnt);
eleInput2.setAttribute('type','text');
now i was to implement the onfocus attribute to it as follows:
eleInput1.onfocus = function () { setfound(this.form.First+cnt); }
However I obviously cannot write First+cnt above. I tried concatenating a string variable and adding that, but that didn't work. I also tried:
eleInput1.onfocus = function () { setfound(this.form.elements['First'+cnt]); }
And that didn't work as well.
Any suggestions???
Thank you!
i have a question. So here's the situation, i have an html file with a form. I have named the text inputs in the form, 'First1', 'First2', First3', .... since you don't know how many first names you can have. you can keep generating them.
Anyway, that's not my problem. In order to keep generating these inputs, I'm using javascript. So somewhere in the script i have the following:
eleInput1.setAttribute('name','First' + cnt);
eleInput2.setAttribute('type','text');
now i was to implement the onfocus attribute to it as follows:
eleInput1.onfocus = function () { setfound(this.form.First+cnt); }
However I obviously cannot write First+cnt above. I tried concatenating a string variable and adding that, but that didn't work. I also tried:
eleInput1.onfocus = function () { setfound(this.form.elements['First'+cnt]); }
And that didn't work as well.
Any suggestions???
Thank you!