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

Hilight Button

Hi All,


In my vf page 3 buttons when i click first button, hilight first button how to do this.

How to active first or change color dynamically?



 <td ><apex:commandButton id="First" value="1" action="{!setFirstMonth}"/></td>
                    <td ><apex:commandButton id="Third" value="3" action="{!setThirdMonth}"/></td>
                    <td ><apex:commandButton id="Sixth" value="6" action="{!setSixthMonth}"/></td> 


 <td ><apex:commandButton id="First" value="1" action="{!setFirst}"/></td>                    <td ><apex:commandButton id="Third" value="3" action="{!setThird}"/></td>                    <td ><apex:commandButton id="Sixth" value="6" action="{!setSixth}"/></td> 





As per my understanding,

you want to hilight command Button once you click on that (or want to change the color of the othe form element)


add onclick event on first button (or on which you want to drive your logic)

call come Javascript function

and change the style of your Target element

by var target=document.getElementById("");