Page 1 of 1

adding two input values together

Posted: Sat Nov 11, 2006 7:29 pm
by SaharaWizard
hello ppl
I need a bit of help with a javascrip. It is simple. I am making a PHP form tht has three input boxes
1. Price
2. Fee
3. Total

As soon as values are entered into the first two boxes, any value entered into the first and seond box hould be added together and shown into Total. It is simple but I know nohing abut javascrip. can anyone help?
Thanks in advance
SW 8O

Posted: Sat Nov 11, 2006 7:39 pm
by John Cartwright
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:1. Select the correct board for your query. Take some time to read the guidelines in the sticky topic.
Moved to Client-Side.

Posted: Sat Nov 11, 2006 7:47 pm
by feyd
The general idea is to read the value property of the primary fields, convert them to numbers via new Number then set the value property of the Total field to their sum.

devguru.com has lots of information you may find useful regarding the above references.