adding two input values together

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
SaharaWizard
Forum Newbie
Posts: 2
Joined: Sat Nov 04, 2006 6:45 pm

adding two input values together

Post 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
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
Post Reply