You need to sign in to do that
Don't have an account?

Autocheck checkbox when other check box is checked in pageblocktable?
I have two checkboxes in a row in pageblocktable.If i check one,the other should be automatically checked and if unchecked other checkbox should be unchecked.Dont know how to do it in pageblocktable.Please help me how to do this?
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_best_practices_accessing_id.htm
A sample code for your reference as per your requirement
I am passing 2nd checkbox's id "secondcheckbox" to JS method on onClick event.To see the working of page you need to pass an accountid which have atleas 1 contact. for eg https://<serverURL>/apex/Checkbox?id=00120000018cZJw
Please mark it as best answer if it helps you.
All Answers
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_best_practices_accessing_id.htm
A sample code for your reference as per your requirement
I am passing 2nd checkbox's id "secondcheckbox" to JS method on onClick event.To see the working of page you need to pass an accountid which have atleas 1 contact. for eg https://<serverURL>/apex/Checkbox?id=00120000018cZJw
Please mark it as best answer if it helps you.