• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

on the fly create new jsp column

 
kri shan
Ranch Hand
Posts: 1460
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to jsp. I have jsp form with 5 columns.

a b c d e
2 4 6 3 2

here a,b,c,d,e are my column headings. I i submit the form, it should display a,b,c,d,e,f (one extra column, f column value is multiplication of d & e)
How can i do that ?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64617
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Given the brevity of your question, the only answer possible is to add the extra column when you generate the HTML. Beyond that, I have no idea what your issue is.
 
kri shan
Ranch Hand
Posts: 1460
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Initially jsp form has only 5 columns. when the user submits, it generates another(6th) column. This 6th column value is multiplication of existing 2 column values.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64617
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, so what code have you written so far? What's the problem you are having?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is your submit button in a form ?
If so, add hidden tags to your form, one with the value of 'd', and another one with the value of 'e'.
After submitting, get the value of the hidden tags, and multiply.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic