• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calculation in jsp table for each row

 
biswajit kr das
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a table in jsp which have 3 columns- num1, num2, sum



I want to display the sum automatically for each of the row. Above code works only for the first row, but not for the other rows. I am not sure how to achieve that. Thanks in advance
 
Joe Ess
Bartender
Pie
Posts: 9266
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch.
You have hard coded the names of the fields in the function. You need a way to tell which row you are on and which fields you are using. Any ideas?
I'm going to move this to the javascript forum since this isn't really a Struts problem.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic