I have faced some requirement in my development work . User must be able to select all the record in the page block table in one click . So I added header check-box in page block table . Here is the code how I achieved this. Only Java Script code I have used . This is the my page <apex:page controller="ControllerforheaderCheckboxinPBT"> <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; } } ...
A place where you have to land for exploring Salesforce