Here is (Yes/No) radio button onChange event CSJS that disables/enables another 'inputOtherRadio' radio button. And it works perfect:
rObj = dojo.query("[id$=':inputOtherRadio']");
if(thisEvent.target.value=="Y"){
rObj.disabled = true;
} else {
rObj.disabled = false;
}
But if I set xPage 'inputOtherRadio' component Disable property = true then the code above doesn't work (it doesn't undisable ...)
<xp:radioGroup id="inputOtherRadio" disabled="true">
<xp:selectItem itemLabel="Yes" itemValue="Y" id="selectItem11"></xp:selectItem>
<xp:selectItem itemLabel="No" itemValue="N" id="selectItem12"></xp:selectItem>
</xp:radioGroup>
How to make CSJS code work for disabled component?
disabled
property set totrue
, it's passed to the browser initially as disabled. The CSJS code itself is working still, but the eventHandler doesn't trigger, because the component is disabled, so shouldn't be clickable. – Paul Stephen Withers