Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show Running Total

Status
Not open for further replies.

RBaggs

Programmer
Aug 29, 2002
1
US

I have 10 input fields in a form. The user will input a number into any or all of those fields. How would I have a running total displayed in a field called total_amount that is updated as each new field has a number entered? I don't want it to only be updated on submit. Thanks.
 
javascript onBlur event for each field while you have a variable with the holding of the total amount and increment it by the next amount.

ASP will not give you what you want without the trip to the server (submit)

_____________________________________________________________________
onpnt2.gif
[sub]
Hakuna matata!!
[/sub]
 
Running total from multipe select -HELP! (thread216-657766)

I'm sure you can adapt it to work with your text boxes.

Just watch out for folks entering letters :)

Posting code? Wrap it with code tags: [ignore]
Code:
[/ignore][code]CodeHere
[ignore][/code][/ignore].
 
you mean a I isn't the same as a 1 [lol]

_____________________________________________________________________
onpnt2.gif
[sub]
Hakuna matata!!
[/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top