function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Reg: Enabling controls on VF page without using javascript




When we select a value from the picklist, based on picklist value i would like to enable controle in VF page.

I did the same thing through Javascript. But how can i achieve it through Apex coding.





Check out actionSupport visualforce component. You can add an onclick event to the selectOption and fire an apex method using actionSupport (for example). If that doesn't work, please elaborate on your use case or requirement. 


aalbert thank u for reply,


   Requirement is,based on the value selected in the picklist some of controlls(like checkboxes,radio buttons,textboxes...) are enabled or disabled.


          i am getting this using javascript property


                                        document.getElementById('id').disabled ='true';


But  my requirement is without using javascript i need to enable or disable controlls on vfpage based on value selected in picklist.



ThanX in Advance