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

Home Posts Topics Members FAQ

Automatically uncheck check/uncheck button on unchecking one selection

13 New Member
Hi,
I have 5 checkbox elements,
i.e:

( 1 ) a
( 2 ) b
( 3 ) c
( 4 ) d
( Check/Uncheck all )

i want to check all the selections if the check button is check and uncheck all the selections when the uncheck button is unchecked but here's the catch, if i uncheck the 1st selection or other selections the check/uncheck button will automatically uncheck too. can anyone help me please?
Jul 30 '07 #1
5 2810
gits
5,390 Recognized Expert Moderator Expert
hi ...

please post the code you already have, the check- and uncheck-controls are checkboxes too? ... please show the html too ...

kind regards
Jul 30 '07 #2
kid
13 New Member
heres my code:

[HTML]<form name="myform" action="myform. php" method="post">
<b>Your Favorites</b><br>
<input type="checkbox" name="list" value="1">Pie<b r>
<input type="checkbox" name="list" value="2">Pizza <br>
<input type="checkbox" name="list" value="3">Candy <br>
<input type="checkbox" name="list" value="4">Soda< br>
<input type="checkbox" name="list" value="5">Antac ids<br>

<input type="checkbox" name="listAllCh eck" value="listAllC heck" onClick="checkA ll(document.myf orm.list,this)" ><strong>Chec k / Uncheck All</strong><br>
</form>


<SCRIPT LANGUAGE="JavaS cript">
<!-- Begin
function checkAll(checkn ame, checksubmit) {
for (i = 0; i < checkname.lengt h; i++)
checkname[i].checked = checksubmit.che cked? true:false
}
// End -->
</script>[/HTML]
Jul 30 '07 #3
gits
5,390 Recognized Expert Moderator Expert
hmmm ... ok ... but i don't get the problem. you check the check-all checkbox and all checkboxes will be checked, uncheck it ... unchecks all boxes ... and now? when checking/unchecking a box from the list - nothing happens, so what behaviour do you want to have?

kind regards
Jul 30 '07 #4
acoder
16,027 Recognized Expert Moderator MVP
Changed the thread title.

Please use meaningful titles. Thank you.
Jul 31 '07 #5
acoder
16,027 Recognized Expert Moderator MVP
Hi,
I have 5 checkbox elements,
i.e:

( 1 ) a
( 2 ) b
( 3 ) c
( 4 ) d
( Check/Uncheck all )

i want to check all the selections if the check button is check and uncheck all the selections when the uncheck button is unchecked but here's the catch, if i uncheck the 1st selection or other selections the check/uncheck button will automatically uncheck too. can anyone help me please?
I think this link will help.
Jul 31 '07 #6

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

Similar topics

2
16678
by: Mike Kim | last post by:
hi all, i have a checklistbox populated with about 50 items from database. and on the same form, i added to button to do the following. if you click this button, i want to have all items in the checklistbox to be checked i want to have all items in the checklistbox to be unchecked. thanks advance, folks.
1
2761
by: walkerhunter | last post by:
I have the three embedded Ruby(erb) check_boxes below: Patient #1<%= check_box("patient", '1', {}, "yes","no") %></br> Patient #2<%= check_box("patient", '2', {}, "yes","no") %></br> Patient #4<%= check_box("patient", '4', {}, "yes","no") %></br> The HTML output looks like this: Patient #1<input id="patient_1" name="patient" type="checkbox"
1
2561
by: Curtis | last post by:
I am having a problem with the coding below that someone was trying to help me with in another website. I have been to several websites and hopefully here I can get it resolved. I inherited this database and issue, and I apologize for a bit lengthy. The coding is located in the Event Procedure on the "On Open" property of the {rptLetter}: Sub cmdPrint_Click() 'Check if no results in any field, if all missing 'inform user and exit...
1
1848
navenchary
by: navenchary | last post by:
hi I need some help regarding the checking and unchecking of the check boxes in yahoomail or gmail or any other mail. By checking the check all button we can select all the mails in the same way by selectin uncheck all button
0
991
by: =?Utf-8?B?cmZsYXphcm8=?= | last post by:
Hi All, Control Panel -Regional and Language Options: Languages Tab --We are trying to build an automation utility to configure OS. One of the process to be automated that I haven't been able to solve is the unchecking of all the boxes under "Supplemental language support". I tried searching the web but find none that would help. Is there a way to do this in C# via WMI/API/Registry? Thanks in Advance!
5
6743
by: Andrew Meador | last post by:
I have a form (Change Card List by Status) with a check box (cboNOT) and a list box (lstStatus). There is an Open Report button that opens a report (Report - Change Card List) which uses a query (SQL -Change Card List). What I want to do is have the form open the report where a filter is set to use the values from the check box AND the value selected from the list box to generate the report. What I can't figure out is how to use the...
1
5184
by: Anuj | last post by:
Hi, since sometime I'm stuck in a problem where I want to check or uncheck all the checkboxes. If I'm choosing name for the checkbox array as 'chkbx_ary' then I'm able to check/uncheck all the checkboxes (code pasted below). But if name of the checkbox array is 'chkbx_ary' then it's failing. I want the name to be 'chkbx_ary' because I want to access this array at server side. Though one may not require to see php part but I'm still pasting...
2
2167
by: Destiny111 | last post by:
Hi! I have a gps program which works only when the "manage gps automatically" function is checked in the PDA settings. I do not want to enable user to disable my gps coords logging by uncheck this, also I want to check the state of this at program start. I need a registry key which related to this function if it exits. Thanks. Ps.: I know, I can disable gps settings icon from registry, but before I do this I need to check...
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
10324
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...
1
10090
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
9949
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
8971
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...
0
6739
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();...
1
4050
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
3
2879
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.