You need to sign in to do that
Don't have an account?
Vigneshwaran Loganathan
Checking all records using Javascript Issue
Hi,
I have written Javascript to check all records using Checkbox, Plz see the snap
Its working well but after a while it goes like below snap,
My VF
Thanks.
I have written Javascript to check all records using Checkbox, Plz see the snap
Its working well but after a while it goes like below snap,
My VF
<apex:page standardController="Payment__c" extensions="paymentController" id="page1"> <script> function checkAll(cb,cbid) { var inputElem = document.getElementsByTagName("input"); for(var i=0; i<inputElem.length; i++) { if(inputElem[i].id.indexOf(cbid)!=-1){ inputElem[i].checked = cb.checked; } } } function checkAll1(cb,cbid) { var inputElem = document.getElementsByTagName("input"); for(var i=0; i<inputElem.length; i++) { if(inputElem[i].id.indexOf(cbid)!=-1){ inputElem[i].checked = cb.checked; } } } <apex:pageblockSection title="Payslip Selection" columns="1" rendered="{!paysec}" id="pb1s2"> <apex:dataTable value="{!payslip}" var="pay" columnswidth="50px,50px" cellpadding="4" border="1" align="center" id="datatable"> <apex:column > <apex:facet name="header"> <apex:inputCheckbox > <apex:actionSupport event="onclick" action="{!Getselected}" onsubmit="checkAll(this,'checkedone')" rerender="checkedone"/> </apex:inputCheckbox> </apex:facet> <apex:inputCheckbox value="{!pay.selected}" id="checkedone"> <apex:actionSupport event="onclick" action="{!GetSelected}" rerender="Selected_PBS1"/> </apex:inputCheckbox> </apex:column> <apex:column headervalue="Payslip Name" value="{!pay.payslp.Name}" /> <apex:column headervalue="VA Name" value="{!pay.payslp.Name__c}" /> <apex:column headervalue="Bank Account" value="{!pay.payslp.Account_Number__c}"/> <apex:column headervalue="Bank Account" value="{!pay.payslp.Account_Number__c}"/> <apex:column headervalue="Total Pay in Dollar" value="{!pay.payslp.Total_Pay_for_this_period__c}"/> <apex:column headervalue="Total Pay in Peso" value="{!pay.payslp.Total_Pay_in_Peso__c}"/> </apex:dataTable> </apex:pageblockSection>Hope you can help,
Thanks.
I have made correction to your code and i hope it will work as per your expectation. Kindly try and share your views.
Please mark this as solution by selecting it as best answer if this solves your problem, So that if anyone has this issue this post can help
All Answers
Issue is with reRender with actionsupport ,Please check and let me know .
I have made correction to your code and i hope it will work as per your expectation. Kindly try and share your views.
Please mark this as solution by selecting it as best answer if this solves your problem, So that if anyone has this issue this post can help
As you said problem is with rernder only. fine now. Tnx.