File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Dynamic checkbox value have to send to Database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Dynamic checkbox value have to send to Database" Watch "Dynamic checkbox value have to send to Database" New topic
Author

Dynamic checkbox value have to send to Database

lokesh pushpa
Greenhorn

Joined: Nov 21, 2011
Posts: 23
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

Joined: Aug 09, 2012
Posts: 179
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


Programming is about thinking, NOT coding
lokesh pushpa
Greenhorn

Joined: Nov 21, 2011
Posts: 23
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

Joined: Aug 09, 2012
Posts: 179
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

Joined: Nov 21, 2011
Posts: 23
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

Joined: Aug 09, 2012
Posts: 179
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

Joined: Nov 21, 2011
Posts: 23
Sorry Vishal.....
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Dynamic checkbox value have to send to Database
 
Similar Threads
Unchanged dynamically created check boxes not in request object.
Selecting all checked checkboxes with jquery
Check Box with Jsp:How-To
vertical checkbox display
problem in output format