473,785 Members | 2,969 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

checked AND unchecked

Hi again,

Within a submitted page that has mutilple checkboxes with
the same name, the request.form("m ycheckboxes") has a
comma separated list of the values of all the ones
checked....
but I also need to know which ones are not checked... How
can I know that ?

Thanks.
Jul 19 '05 #1
2 2551
It's the rest of them ;)

You need to either go get them again, or include all the values in a hidden
field.

I'm assuming your checkboxes are coming from a database. So you could
requery the database and compare the returned values with those submitted.

OR

On your form, you can put in a hidden field with all the values in it.
<input type=hidden name=AllPossibl eCheckboxValues value="1, 2, 3, 4, 88">
"Joel Brabant" <jo**********@t embec.com> wrote in message
news:10******** *************** *****@phx.gbl.. .
Hi again,

Within a submitted page that has mutilple checkboxes with
the same name, the request.form("m ycheckboxes") has a
comma separated list of the values of all the ones
checked....
but I also need to know which ones are not checked... How
can I know that ?

Thanks.

Jul 19 '05 #2
They will not be returned in the form collection if they are not checked.
How are the checkboxes being created? Can you not pull from the same source
to get that information?

You could use a hidden input on your form and then compare the values:

<inpt type="checkbox" name="chk1" value="1">
<inpt type="checkbox" name="chk1" value="2">
<inpt type="checkbox" name="chk1" value="3">
<inpt type="checkbox" name="chk1" value="4">
<input type="hidden" name="allPossib leValues" value="1,2,3,4" >

Ray at work
"Joel Brabant" <jo**********@t embec.com> wrote in message
news:10******** *************** *****@phx.gbl.. .
Hi again,

Within a submitted page that has mutilple checkboxes with
the same name, the request.form("m ycheckboxes") has a
comma separated list of the values of all the ones
checked....
but I also need to know which ones are not checked... How
can I know that ?

Thanks.

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

26
2920
by: OvErboRed | last post by:
I just read a whole bunch of threads on microsoft.public.dotnet.* regarding checked exceptions (the longest-running of which seems to be <cJQQ9.4419 $j94.834878@news02.tsnz.net>. My personal belief is that checked exceptions should be required in .NET. I find that many others share the same views as I do. It is extremely frustrating to have to work around this with hacks like Abstract ADO.NET and CLRxLint (which still don't solve the...
9
1872
by: Jeff Louie | last post by:
I drank too much coffee last night and came up with a suggestion about how to add checked exceptions to C# http://www.geocities.com/jeff_louie/OOP/oop14.htm Comments expected <g> Regards, Jeff
0
1025
by: keithv | last post by:
I've created my own value type which will overload the "+" operator. I have two routines to do addition, differing only in that one throws an error on overflow. Is there a way to get the compiler to apply unchecked and checked semantics to my type: calling MyAdd() for unchecked code and MyAdd.ovl() for checked code? Thanks, Keith
4
2476
by: RodBillett | last post by:
I have a situation where I have 3 checkboxes - and at least 1 needs to be selected at all times... I have implemented the code that allows this behavior to happen, BUT Viewstate gets all messed up. As long as none of the checkboxes are disabled, viewstate works fine - and client actions are 'remembered' after a postback. but when I have one checkbox and it is disabled, then when I postback, ALL checkboxes get the unchecked value. ...
1
7017
by: Dennis | last post by:
I have a checked list box and am trying to use the SetItemCheck method as follows: mylistbox.SetItemChecked(indextoset, True) It seems to have no effect and the display does not show the box as checked. I've tried SetItemCheckedState with the same results using CheckState.Checked. Is this a bug in the checked listbox? It's driving me nuts as I've spent
2
2320
by: Aaron Reimann | last post by:
I have a lot of check boxes. This is an update of the check boxes, I want something was checked, then to do an insert (which is currently working), if something is no longer checked...delete the checkbox join/link that is in the database. So, the insert/checked is working, but the "unchecking" is not working. I don't know how to compare an array of what was not checked. Here is my code: if (is_array($_POST)) {
1
2471
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...
9
2101
by: dfletcher | last post by:
Hi all, This is my first post so please bear with me. I have a youth soccer uniform order ASP application that loads and pulls from a SQL database that allows soccer teams to construct a uniform kit. Each piece of the uniform kit can come in a possible 14 different sizes. But some may only come in 12, 6, 3 sizes or whatever. So when the team uniform guy Creates the kit he checks what sizes are available for each jersey, shorts, socks,...
0
1430
by: J | last post by:
I'm dynamically adding checkboxes in the Page_Load (regardless of PostBack). When IsPostBack, the checkboxes display as I expected and their checked/unchecked status is also as expected. At this point, I want to find particular checkboxes and determine whether they are check/unchecked, but the code only returns that all the checkboxes are unchecked. void SaveModel(Control parent) { // spin through controls recursively foreach (Control...
6
3720
by: beary | last post by:
This is embarrassing, but I have a form pulling data from mysql using php. Lots of different checkboxes in it. When user checks one or more boxes, all goes well; values are added and db is updated. And some php script makes sure those same checkboxes are then checked when page is reloaded. Here's the problem: if I now uncheck one or more of those (automatically when the page loads) checked checkboxes and then do a submit, the form still...
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
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
10148
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
10091
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
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3646
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.