473,410 Members | 1,904 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,410 software developers and data experts.

getting values of unchecked checkboxes

Hi

How to get the values of dynamically created checkboxes which are checked and unchecked (for both the conditions). Only the selected checkbox values are posted as 'On' . How can i get the value of unchecked checkboxes ?
Each row contains 7 checkboxes. These rows are created dynamically by clicking a button. When the page is posted , i need to get the values as

row1 checkbox1[1] = selected checkbox2[1] = notselected checkbox3[1] = selected
row2 checkbox1[2] = selected checkbox2[2] = notselected checkbox3[2] = selected
row3 checkbox1[3] = selected checkbox2[3] = notselected checkbox3[3] = selected
.....
How i could handle this ?

Pls its very urgent
Thanks in advance
somaskarthic
Sep 13 '06 #1
3 5607
ukchat
15
Hi

How to get the values of dynamically created checkboxes which are checked and unchecked (for both the conditions). Only the selected checkbox values are posted as 'On' . How can i get the value of unchecked checkboxes ?
Each row contains 7 checkboxes. These rows are created dynamically by clicking a button. When the page is posted , i need to get the values as

row1 checkbox1[1] = selected checkbox2[1] = notselected checkbox3[1] = selected
row2 checkbox1[2] = selected checkbox2[2] = notselected checkbox3[2] = selected
row3 checkbox1[3] = selected checkbox2[3] = notselected checkbox3[3] = selected
.....
How i could handle this ?

Pls its very urgent
Thanks in advance
somaskarthic
well if your pulling in the tick boxes dynamicaly then you can compare when is ticked against your database to work out what isn't ticked.. how come you need to know what isn't ticked?
Sep 14 '06 #2
ukchat
15
well if your pulling in the tick boxes dynamicaly then you can compare when is ticked against your database to work out what isn't ticked.. how come you need to know what isn't ticked?
can't edit on this forum.. :@
What you may need to do is instead of dynamicaly creating your form and just creating the checkbox as checkbox[] you may need to use items from a databasde and use checkbox[$id] if you get what i mean then you can see what is and isn't ticked when returned
Sep 14 '06 #3
bevort
53
can't edit on this forum.. :@
What you may need to do is instead of dynamicaly creating your form and just creating the checkbox as checkbox[] you may need to use items from a databasde and use checkbox[$id] if you get what i mean then you can see what is and isn't ticked when returned

If all of the checkboxes have there own ID you will get them back to PHP as $[checkboxname] where [checkboxname] is the name you gave them. Otherwise, if the all have the same name You will only get ONE value back, the last one checked
Sep 14 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Pete | last post by:
I have some session variables which get set on page one of my site. I can set an unset these by passing through a parameter in some URL's. When the user goes to the second page some checkboxes are...
2
by: Glenn | last post by:
The following script is supposed to have high categories as radio buttons and mid categories as check boxes. Clicking the radio button is supposed to select all checkboxes under it and submit the...
0
by: elgin | last post by:
I have a form which is formatted so as to print out for mailing. This form contains several option groups with checkboxes. These checkboxes have no data source; the state of the checkboxes are...
29
by: Amer Neely | last post by:
I've got a dynamically built form with checkboxes for each element ( a list of file names in a directory). I need to grab only those checkboxes that are checked, so I can then delete those files. ...
2
by: =?Utf-8?B?RXVnZW5l?= | last post by:
Hi, I have a problem with web development, using gridview and checkbox. My gridview has a few checkboxes, and I would retrieve the user modified values on Save submission (button click). The...
4
by: Robert S | last post by:
I have a form with a checkbox: <form method="post" action="test.php"> <input type="checkbox" name="foo" checked> <input type="submit"> </form> If the checkbox is checked, $_POST gets...
9
by: =?Utf-8?B?UGV0ZXJX?= | last post by:
I have a TabControl on a Windows form in which I have various tab pages each with a DataGridView, the first column of which is a DataGridViewCheckBoxColumn and subsequent columns being...
1
by: ttamilvanan81 | last post by:
Hai i have using the checkbox in for loop. I need the urgent help from anyone, for example in the loop there is having 5 checkbox if i checked 3 of the ckeckboxes and 2 of the checkboxes are...
5
by: bjwest | last post by:
I'm writing a windows mobile app that uses dynamiclly created checkboxes. I'm having trouble getting the checked status. public void Add_CheckBox(String CBText) { ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.