473,749 Members | 2,486 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

getting values of unchecked checkboxes

60 New Member
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 5624
ukchat
15 New Member
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 New Member
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 New Member
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
5484
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 checked if their corresponding session variable is set and has a value of "true". The problem I have is that if the user unchecks a checkbox before finally moving to page three (which is perfectly okay for them to do if they wish) then I need...
2
2215
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 form. RADIO (ID = 0001-1 VALUE="") CHECK (ID=0001-0011) CHECK (ID=0001-0012) RADIO (ID = 0001-2 VALUE="") CHECK (ID=0001-0021) CHECK (ID=0001-0022)
0
1375
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 updated on the "on current" event that pulls the data from an underlying table. When I open the form, everything looks great, but when I do print preview (and/or print) the checkboxes in 3 of the option groups are all unchecked. When I cancel print...
29
3154
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. Does each checkbox name have to be unique? I was hoping to just group them under one name, and select from that array. PHP is not my native language - I'm coming at this from Perl, so bear with me, things are a little different in that country.
2
4255
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 problem is, consider the example where I set the initial check value for them to be true (checked), on execution, user untick them; but on save, the code-behind still sees the checkboxes to assume the true value (rather than the new unchecked). ...
4
25258
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 assigned the value "on" (using php as the second file)
9
10414
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 DataGridViewtextBoxColumns. In each case the properties of the CheckBoxcolumn have been set to not allow nulls, so presumably only explicit true or false values should be possible. I run the application and set check boxes for DataGridView rows I am...
1
2470
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 unchecked. I need to get the values for checked checkboxes and unchecked checkboxes. Because if i checked the checkboxes, those values need to be inserted into the database. Those for unchecked checkboxes values need to be deleted from the database. Can...
5
3679
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) { CheckBox MyCheckbox = new CheckBox(); MyCheckbox.Location = new System.Drawing.Point(4, CB_Row * 20); MyCheckbox.Name = "MycheckBox" + CB_Row; MyCheckbox.Text = CBText; MyCheckbox.Font = NormalFont; ...
0
9566
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9388
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9333
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8256
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6800
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.