Solved

to set the flag for checkbox

Posted on 2006-11-11
5
329 Views
Last Modified: 2010-04-01
when we select the checkbox how to set the flag in the database
0
Comment
Question by:chintamanyam
5 Comments
 
LVL 16

Accepted Solution

by:
Peter Kwan earned 168 total points
ID: 17924337
You can pass the checkbox value (a String for each value) to the backend and get the checked value from the request parameter or a form bean. In case more than one value is checked, you need to use an array to store them. Then you can use the passed value to set the flag in the database by a mapping (e.g. Value1->Flag1).
0
 
LVL 11

Assisted Solution

by:Manish
Manish earned 166 total points
ID: 17924338
You can enter value for that checkbox in database.
0
 
LVL 5

Assisted Solution

by:deeppra
deeppra earned 166 total points
ID: 18018943
u can have the same name for all the checkbox but the value should be different
like this

<input type="checkbok" value="value1" name="topics">Topic 1
<input type="checkbok" value="value2" name="topics">Topic 2
<input type="checkbok" value="value3" name="topics">Topic 3

then in u r JSP or servlet page u can get all the selected topics by using this function getParameterValues()

like this
String interested_topics[] = request.getParameterValues("topics");

So this will return all the selected items value in a String array then u can store all the values in the database
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
communication with a non technical owner 16 100
Session migration 1 102
unit test DAO layer 1 134
maven project in eclipse 11 57
There are many Password Managers (PM) out there to choose from. PM's can help with your password habits and routines, but they should not be a crutch you rely on too heavily. I also have an article for company/enterprise PM's.
A customer recently asked me about anti-malware and the different deployment options available for his business. Daily news about cyberattacks, zero-day vulnerabilities, and companies that suffered a security breach made him wonder if the endpoint a…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now