View Full Version : javascript event help needed

08-29-2008, 12:34 PM
I need advice about javascript events because I don't know when to execute them properly.

I have a gridview with three different textboxes (serve different purpose). In first three (three in a row) user puts in values (they have onchange event for calculation). Values of them are calculated and shown in textboxes at the end of each row (like subtotal textbox). This textboxes are readonly (user cannot change them) because they serve only as to show "middle info" and values. Values of all subtotals are summed together in footer row where i have textbox where this value is shown.

I have two different functions one for calculating row subtotals and another for calculating those subtotals together.

So my question is where to put the event which will sum this subtotals together?

I cannot put on subtotal textboxes because they are read only and user cannot "play" with them...

Is there any trick known for javascript to execute event when text in textbox is changed automatically (not like onchange event which is dependent from user interference).

Thanks for all suggestions and help.

08-29-2008, 08:29 PM
I would calculate the total every time I wrote a subtotal to the readonly fields.