hostfreak Posted November 9, 2006 Share Posted November 9, 2006 I've made form that has input boxes for money. I would like to have it to where when an amount is typed in, it will automaticly total the amount for each row and show the total for each row. To get a better understanding of what exactly I am trying to do, I have attached an image of the form. I'm just looking for help, ideas on where to start, what I will need to look into etc. I am not very good with javascript, I know the basics and am learning more about it every day. Thanks for any replies.[attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/26764-totaling-money/ Share on other sites More sharing options...
fenway Posted November 10, 2006 Share Posted November 10, 2006 You need to monitor the onblur event for each input, and then go find all the ones you want to add, and set the total field yourself. Link to comment https://forums.phpfreaks.com/topic/26764-totaling-money/#findComment-122827 Share on other sites More sharing options...
hostfreak Posted November 11, 2006 Author Share Posted November 11, 2006 Thanks for the information on where to start fenway. I will have to look into onblur. As I mentioned, I am new to javascript so please excuse my ignorance on it. Isn't there some type of formula involved as well, when trying to add the money and rounding up etc? Link to comment https://forums.phpfreaks.com/topic/26764-totaling-money/#findComment-122940 Share on other sites More sharing options...
fenway Posted November 12, 2006 Share Posted November 12, 2006 Yes, you'll have to sum up the fields, and round the numbers as you see fit. Link to comment https://forums.phpfreaks.com/topic/26764-totaling-money/#findComment-123418 Share on other sites More sharing options...
hostfreak Posted November 12, 2006 Author Share Posted November 12, 2006 Eh, I gave it a shot following a tutorial. Seems a little more complicated than what I thought it would be. I guess I will look into some more tutorials etc and see what else I can do. Thanks. Link to comment https://forums.phpfreaks.com/topic/26764-totaling-money/#findComment-123652 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.