Addition, with a twist
Hi there,
I'm not sure if what I'm looking to do is even possible in Acrobat/Javascript but here goes.
I'm trying to design a digital character sheet for a typing impaired person to use. As such I have tried to make as much of it as possible click and choose, dropdown menu's, lists etc. Things are going well so far, with some help from Nesa and Thom, but I have run into an issue I'm hoping someone can help me solve. As part of the sheet when someone makes choices and chooses weapons, equipment, armour and such text fields are populated with details for the item chosen. One of those fields is the weight of the item. I have figured out how to keep a running total of all items chosen so that the user can see exactly how much everything they have weigh's in total. Another of the fields is the cost of the item, with items ranging in values of Copper, Bronze, Silver and Gold. Here is where I have run into my stumbling block. I would like to be able to keep a running count/total of the cost of everything the user buys but can't figure out how to add the four cerrencies, Copper, Bronze, Silver and Gold together. Anything I've tried ends up with a 'NaN' result in the result box. Is there a way of adding all four currencies together. I don't mind if the resulting output will be XGold-XSilver-XBronze-XCopper, or XGold,XSilver,XBronze,XCopper or a variant of those, as long as it will add the amounts and display them where the user can see.
Any help, even letting me know it can't be done, would be gratefully received. 🙂
thanks,
Jim
