Hi all,
I’m new here but have been trying to learn javascript and ran into a very difficult project (atleast at my level of knowledge)
The little bit of code I did try to work on, didn’t work and those I found on the web were to hard to configure.
What I need is a javascript that will automatically update a two uniqe total fields, tax field and a grand total field based on a quantity input (without forcing the user to ‘click a button’ or anything) while preventing them from modifying the total costs, tax total and grand total using a readonly or onfocus() function. I searched the boards and couldnt find anything that solved this.
Here is an example of what I’m trying to do:
[CODE]
<input type=”text” name=”number_of_participants”> This is the QUANTITY field and for every one participant the cost is 250 dollars.
<input type=”text” name=”participant_total_cost”> This field will automatically update with the correct value depending on the participant quantity value.
<input type=”text” name=”number_of_reservations”> This is another QUANTITY field and each reservation is 35 dollars.
<input type=”text” name=”reservation_total”> This field will automatically calculate the correct cost of all reservations.
<input type=”text” name=”tax_owed”> This field needs to be set to 6% and automatically update itself according to the totals of the participants and reservations total costs.
<input type=”text” name=”grand_total”> and of course this field will automatically update according to the participant total cost, reservation total cost and the 6% tax.
As previously mentioned, I’ve tried doing this but gave up after many frustrated hours of errors and confusion.
All help would be so greatly appreciated and credit will be given.
Thanks in advance.