Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic checkbox value have to send to Database

 
lokesh pushpa
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
i need to send 2 dynamic check boxes values to db from my jsp.
I am creating 2 check boxes in a transaction table.
Table :
Date Transaction
12/2/2012 Here i am creating 2 checkboxes dynamically for all tranasctions, i want to send these checkboxes values into Database

<input type="checkbox" id="reimburseable" style="margin-left: 0px"/>Reimburseable
<input type="checkbox" id="taxDeductible"/>Tax Deductible
Please guide me on this.............
 
Vishal Shaw
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I think you got it wrong. You should consider sending those checkbox values to a Servlet instead, and that Servlet should send that data to your database or DAO.

BTW, by send do you mean submit with <form> or send it as a parameter

Vishal
 
lokesh pushpa
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Vishal,
Thanks for reply.... Here i am using ajax call to send the values... but i need how to send the value of dynamic check boxes to action
Onclicking i have implemented one script method i am calling that method, but i am not getting that values....
so i am not able to send the values to action..
can you please expalin brefily ....Step by step process
 
Vishal Shaw
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lokesh kumarputta wrote:



As clearly evident , no values are associated with the check boxes , so you will not get any value.

Check out some tutorials for check boxes . I am posting a link
 
lokesh pushpa
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vishawl,
Thanks for your reply.... Here i am passing the values also.... But i didn't post ... any way ... your link is good... i think it will be useful for my requirement....

Thank You very much.....
 
Vishal Shaw
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lokesh kumarputta wrote:Hi Vishawl,
Thanks for your reply.... Here i am passing the values also.... But i didn't post ... any way ... your link is good... i think it will be useful for my requirement....

Thank You very much.....


By the way, you got my name wrong.
 
lokesh pushpa
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry Vishal.....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic