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

SelectList disable / enable
Hello,
I have 4 selectList and I would like when I click on one, the other three remain disable...
I click on another (even disable), the others are disable and it is enable...
How do I do this with JS??
I did something like this, but DONT WORK:
I have 4 selectList and I would like when I click on one, the other three remain disable...
I click on another (even disable), the others are disable and it is enable...
How do I do this with JS??
I did something like this, but DONT WORK:
function enableJusteWeek(){ document.getElementById("{!$Component.theform.block01.month}").disabled; document.getElementById("{!$Component.theform.block01.year}").disabled; document.getElementById("{!$Component.theform.block01.week}").disabled; } ..... <apex:selectList size="7" value="{!days}" multiselect="true" onclick="enableJusteWeek();">
<script>document.getElementById('{!$Component.oppEditPage:oppEditForm:opportunityPageId:opBlockId:bsi1:opStageName}').disabled = {!disableInput}; </script>
All Answers
What is the field type that you are using, did you try using a radio button which has similar function.
See the link below for using a radio button in visualforce.
http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_selectRadio.htm
http://www.infallibletechie.com/2012/07/radio-button-in-salesforce.html
Regards,
Ashish
<script>document.getElementById('{!$Component.oppEditPage:oppEditForm:opportunityPageId:opBlockId:bsi1:opStageName}').disabled = {!disableInput}; </script>