P
Pål Sindre Hiåsen
Hi,
The thing I want to do, is to get - change and put content from text
fields that is dynamically created.
I use PHP to create the form that have textfields in it. The number of
textfields vary.
The name of each field is text2 - text3 - text4 and so on.
So in javascript I want to get the content in text2. And that without
writing:
value = parseInt(document.form1.text3.value);
I want to put this into a for loop and do something like this
for(i=0;i<numfield;i++)
{
value = parseInt(document.form1.["text"+i].value);
}
Is this posible in javascript, and if so what is the syntax?
Regards,
Sindre
The thing I want to do, is to get - change and put content from text
fields that is dynamically created.
I use PHP to create the form that have textfields in it. The number of
textfields vary.
The name of each field is text2 - text3 - text4 and so on.
So in javascript I want to get the content in text2. And that without
writing:
value = parseInt(document.form1.text3.value);
I want to put this into a for loop and do something like this
for(i=0;i<numfield;i++)
{
value = parseInt(document.form1.["text"+i].value);
}
Is this posible in javascript, and if so what is the syntax?
Regards,
Sindre