I am currently working on a page for a friend who is wanting to give users the option of choosing the number of tickets they want and then the form calculating how much it costs for those tickets and then totals it at the bottom
I'm really struggling with the JavaScript. I have coded something already (code is within the attached txt file as it was too long to post) but I am having lots of trouble getting the tickettotal field at the end to total all the fields above it. Basically, it doesn't seem to add them together at all - I just get an error displayed in it saying undefined and then the other field values after undefined. If I remove the curr_format function it accepts the values of the fields but instead of adding them together it just puts them all in side by side (for instance, if the two field values were 10 and 20 it puts in the total 1020 instead of what I want which is 30 - 30.00 is what I'm aiming for)
Can anyone offer me any suggestions/pointers on what I am doing wrong - pointing me in the right direction (or just a sample) rather than coding it all is what I want so that I can learn from other's and also my own mistakes
Thanks for any help
I'm really struggling with the JavaScript. I have coded something already (code is within the attached txt file as it was too long to post) but I am having lots of trouble getting the tickettotal field at the end to total all the fields above it. Basically, it doesn't seem to add them together at all - I just get an error displayed in it saying undefined and then the other field values after undefined. If I remove the curr_format function it accepts the values of the fields but instead of adding them together it just puts them all in side by side (for instance, if the two field values were 10 and 20 it puts in the total 1020 instead of what I want which is 30 - 30.00 is what I'm aiming for)
Can anyone offer me any suggestions/pointers on what I am doing wrong - pointing me in the right direction (or just a sample) rather than coding it all is what I want so that I can learn from other's and also my own mistakes
Thanks for any help

Comment