dcsimg
Performing an arithmetic operation from dynamically generated textfields
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Arathi_Sivaramakrishnan
Posted On:   Thursday, December 27, 2001 03:36 AM

I am dynamically generating rows of text fields depending on the data in the database.Because of this the text fields becomes an array. When a value in this dynamically generated textfield is changed I want to perform multiplication of 2 text field values in that row.How can I achieve this? For ex: TF1[0] TF2[0] TF3[0] RB TF1[1] TF2[1] TF3[1] RB RB- Radio button When I lose focus from TF2[0] I have to get the product of the values in TF1[0] and TF2[0] and place it in TF3[0] . I am able to pass the selected row value from the radio button When I give onBlur function I am not able to retrieve the values in the text fields.Can anyone help?    More>>

I am dynamically generating rows of text fields
depending on the data in the database.Because of this
the text fields becomes an array.
When a value in this dynamically generated textfield is changed
I want to perform multiplication of 2 text field values
in that row.How can I achieve this?
For ex:
TF1[0] TF2[0] TF3[0] RB
TF1[1] TF2[1] TF3[1] RB
RB- Radio button
When I lose focus from TF2[0] I have to get the product
of the values in TF1[0] and TF2[0] and place it in TF3[0] .
I am able to pass the selected row value from the radio button
When I give onBlur function I am not able to retrieve
the values in the text fields.Can anyone help?

Thanks in advance.
Arathi

   <<Less

Re: Performing an arithmetic operation from dynamically generated textfields

Posted By:   Firat_Tiryaki  
Posted On:   Thursday, December 27, 2001 07:11 AM

create the fields named tf1_1, tf1_2 etc

use eval() function to gain access to the field specified with "_i" in a loop that uses "i" as an index.
About | Sitemap | Contact