Improve company productivity with a Business Account.Sign Up

x
?
Solved

to set the flag for checkbox

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

Accepted Solution

by:
Peter Kwan earned 672 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 664 total points
ID: 17924338
You can enter value for that checkbox in database.
0
 
LVL 5

Assisted Solution

by:deeppra
deeppra earned 664 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Get to Know about Lotus Notes email migration to Office 365 in detail. Explore the article for better Lotus Notes to Office 365 migration techniques to transfer all data items to the O365 domain.
Lotus Notes is the most prominent choice of all users due to its advance email management. It provides email features along with contact management, appointments, task, calendar etc. Many users rely on its service to carry out electronic communicati…
Through the video, you can check the migration process of Outlook PST file to PDF. Kernel for Outlook to PDF tool can convert Outlook emails with all attributes like Subject, To, From, Cc, Bcc and other folders such as Inbox, Outbox, Sent Items, Jun…
Watch the software video of Kernel Import PST to Office 365 tools which can easily import PST and OST files to Office 365 for bulk mailboxes. The process of migration is simple and user can map source and destination mailboxes and easily import data…

585 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