hi frens..

i ll simplify my requirement and explain the issue..

lets say, i have 3 textbox rate, quantity, total and a "add row" button. I must be able to add any no. of rows. There must also be a supertotal field before the "add row" button to display the total of totals. after entering rate and quantity, the total and supertotal should get calculated automatically without refresh.

I am able to add rows successfuly, but total is getting calculated for only 1st row..
here is the code

		var rate, qty, total;
		rate = parseFloat($("#rate").val());
		qty = parseFloat($("#quantity").val());
		total = qty*rate;
			$("#total").val("There was a error");

how can i get this thing to work for all rows and also calculate the supertotal?
plss help me out with this..


Recommended Answers

All 3 Replies

Member Avatar for diafol

This is javascript. Why are you posting here? Move it to the javascript forum.

aah u r right..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.