Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2008
    Thanked 0 Times in 0 Posts

    javascript event help needed

    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.

  • #2
    Regular Coder
    Join Date
    Mar 2006
    Thanked 132 Times in 123 Posts
    I would calculate the total every time I wrote a subtotal to the readonly fields.


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts