playaz Posted October 16, 2008 Share Posted October 16, 2008 Hi guys, I basically have a form that displays a number of rows within a table, each row has an amount in an text input that I would like to add up in the very last row to make the 'total amount'. The tricky bit is as follows, each row has a checkbox, if this is NOT checked this should not add the the amount from the text input on that row to the total amount. Furthermore, the text inputs are all editable so all the calculations will need to be done 'on the fly' - can anyone suggest how I can do this, maybe using jQuery / Ajax? Thanks in advance Quote Link to comment Share on other sites More sharing options...
playaz Posted October 16, 2008 Author Share Posted October 16, 2008 Me again, I wasnt sure how to edit my own post - below is an example of what I am tryin to achieve in the post above - i hope this helps thanks Quote Link to comment Share on other sites More sharing options...
CroNiX Posted October 16, 2008 Share Posted October 16, 2008 You dont need those to do this. You just need an onchange event for the text boxes and an onclick event for the checkbox. These should call a function that will recalculate the total based on if the checkbox is checked. Quote Link to comment Share on other sites More sharing options...
playaz Posted October 16, 2008 Author Share Posted October 16, 2008 Thanks cronix - I will have a try at that, could you or possibly anyone give me a helping a hand as my javascript isn't the greatest thanks again Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.