Solved

to set the flag for checkbox

Posted on 2006-11-11
5
338 Views
Last Modified: 2010-04-01
when we select the checkbox how to set the flag in the database
0
Comment
Question by:chintamanyam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

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

Postmortem reporting allow us to examine mistakes in a way that focuses on the situational aspects of a failure’s mechanism and the decision-making process of individuals proximate to the failure. Read our guide on how to handle IT post-mortem repor…
Let’s face it: one of the reasons your organization chose a SaaS solution (whether Microsoft Dynamics 365, Netsuite or SAP) is that it is subscription-based. The upkeep is done. Or so you think.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

734 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