To disable other checkboxes in a section if one is selected.
<apex:page> <apex:form> <script> function confirmDisbaled(ifchecked, id1 ,id2,id3) { document.getElementById(id1).disabled = ifchecked; document.getElementById(id2).disabled = ifchecked; document.getElementById(id3).disabled = ifchecked; } </script> <apex:pageBlock> <apex:actionRegion > <apex:outputPanel id="panel1"> <apex:pageBlockSection title="PST" id="PST"> <apex:inputCheckbox label="Global" id="gbl" onchange="return confirmDisbaled(this.checked, '{!$Component.lcl}','{!$Component.cntry}');"/> <apex:inputCheckbox label="Local" id="lcl" onchange="return confirmDisbaled(this.checked, '{!$Component.gbl}','{!$Component.cntry}');"/> <apex:inputCheckbox label="Country" id="cntry" onchange="return confirmDisbaled(this.checked, '{!$Component.lcl}','{!$Component.gbl}');"/> </apex:pageBlockSection> </apex:outputPanel> </apex:actionRegion> </apex:pageBlock> </apex:form> </apex:page>
No comments:
Post a Comment