function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
raj123raj123 

Un Checking the select all checkbox Checking in the page block table

Hi folk,

 

I am not getting how to unckeck the select all checkbox , which was checked to select all the records in the blage block table for the bulk update,

 

even after the bulk  update the select all check box displays as checked but its not active , how to revome this

 

i am using the following script

 

 <script type="text/javascript">
        function checkAll(cb)
        {
            var inputElem = document.getElementsByTagName("input");           
            for(var i=0; i<inputElem.length; i++)
            {    
                 if(inputElem[i].id.indexOf("checkedone")!=-1)                          
                inputElem[i].checked = cb.checked;
            }
        }
    </script>


Navatar_DbSupNavatar_DbSup

Hi,

For Un Checking the select all checkbox Checking in the page block table you need to uncheck header checkbox and call the checkAll function again.

 

 

Follow the below steps:

 

Set id of the header checkbox and after updating the records call a JavaScript function

 

Function uncheckallchekbox()

{

                Var  header=document.getElementById("check1");

If(header. checked ==”true”)

{

                document.getElementById("check1").checked=” false”;

                document.getElementById("check1").onclick();

}

 

}

 

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

 

 

 

 

 

 

 

ShaTShaT

Hi Raj,

 

try this function -in java script 

 

function chkSum(selSpace){
var checkNodes = document.getElementsByTagName("input");
for(var i=0; i < (checkNodes.length); i++) {
if(checkNodes[i].type == 'checkbox') {
var eleId = checkNodes[i].id;
if(eleId.indexOf('chkSpaceBx') > -1) {
if(selSpace.checked) {
checkNodes[i].checked = true;
} else {
checkNodes[i].checked = false;
}

}

}

}

}

 

Thanks

Shailu

raj123raj123

i solved it , the <apex:inputcheckbox>was not working properly, i changed it witht the HTML checkbox tag in hte pageblock header