Connecting Tech Pros Worldwide Forums | Help | Site Map

Autosum text fields possible??

Newbie
 
Join Date: Aug 2008
Posts: 4
#1: Aug 25 '08
I've created a webform for a user to order from a catalog. There are five colums (item #, quantity, description, price and total) and 10 rows (repeating first row so the user can order up to 10 items). The item # and description are obviously not factors, but I'd like to have the user enter a quantity and price, and have the script multiply them for a total, then (if possible) add the totals for a sub total, and (if my dreams come true) multiply the subtotal by 8% (sales tax) and display the sub total, tax and grand total.

I've seen this done many times with fixed prices but I can't find how to do it with user completed text fields.

I've started reading the tutorial, but she's a bit of a lengthy novel. I'm setting up a site for my wife's home business, (I'm 100% amature, but know just enough to really screw things up), and somehow she decided I'd be her IT department.

Any ideas??? Thanks, David

Nepomuk's Avatar
Moderator
 
Join Date: Aug 2007
Location: Germany
Posts: 2,466
#2: Aug 26 '08

re: Autosum text fields possible??


Quote:

Originally Posted by davncong

I've created a webform for a user to order from a catalog. [...] I'd like to have the user enter a quantity and price, and have the script multiply them for a total, then (if possible) add the totals for a sub total, and (if my dreams come true) multiply the subtotal by 8% (sales tax) and display the sub total, tax and grand total.

All of this is certainly possible, the question is however, which language is best for this task. Java could be used theoretically, but it's server based and as far as I know, such things are more commonly done in a client based way - normally with JavaScript or a similar language.
Quote:

Originally Posted by davncong

I've started reading the tutorial, but she's a bit of a lengthy novel.

"The" tutorial isn't very clear - which tutorial have you been reading?

Of course, if you decide to do this with JavaScript, you should post both your question as well as the answer to mine in our JavaScript Forum.

Greetings,
Nepomuk
Newbie
 
Join Date: Aug 2008
Posts: 4
#3: Aug 26 '08

re: Autosum text fields possible??


I reposted in the correct forum. The tutorial was a java tutorial, not javascript. It was the one referenced at the top of this thread. thanks for the direction


Quote:

Originally Posted by nepomuk

All of this is certainly possible, the question is however, which language is best for this task. Java could be used theoretically, but it's server based and as far as I know, such things are more commonly done in a client based way - normally with JavaScript or a similar language."The" tutorial isn't very clear - which tutorial have you been reading?

Of course, if you decide to do this with JavaScript, you should post both your question as well as the answer to mine in our JavaScript Forum.

Greetings,
Nepomuk

Nepomuk's Avatar
Moderator
 
Join Date: Aug 2007
Location: Germany
Posts: 2,466
#4: Aug 26 '08

re: Autosum text fields possible??


Quote:

Originally Posted by davncong

I reposted in the correct forum. The tutorial was a java tutorial, not javascript. It was the one referenced at the top of this thread. thanks for the direction

You're welcome and good luck with that website!

Greetings,
Nepomuk
Reply


Similar Java bytes