You need to sign in to do that
Don't have an account?
DJP1S
How can I enable a button once a selectList value is chosen?
I've got a select list with values in it, once something other than null or "--None--" is selected, I want a button to cease being disabled. How might this be accomplished, generally? Here's the chunk of code I'm working with:
<b> IMC: </b> <apex:selectList value="{!selectedIMC}" multiselect="false" size="1" rerender="Search for CC Emails" > <apex:selectOptions value="{!availableIMCs}"/> </apex:selectList> <b>Record Limit </b> <apex:inputText value="{!queryLimit}" required="false" style="width:30px;"/> <apex:commandButton value="Search for CC Emails" action="{!searchForClientCCs}" rerender="clientCCBlock, buttonBlock" status="ccSearchStatus" disabled="true"/> <apex:actionstatus id="ccSearchStatus"> <apex:facet name="start"> <div class="waitingSearchDiv" id="el_loading" style="background-color:#fbfbfb; height:100%; opacity:0.65; width:100%;"> <div class="waitingHolder" style="top: 84px; width: 91px;"> <img class="waitingImage" src="/img/loading.gif" title="Please Wait..." /> <span class="waitingDescription">Searching...</span> </div> </div> </apex:facet> </apex:actionstatus>
I want Seach for CC Emails to enable when I click a value in IMC. Even a blog post overviewing the topic would be helpful. Thanks.
a. handle the onChange javascript event on the. apex:selectoption.
b. upon onChange, call a javascript that checks if the new value is other than none. if so, enable the button.
let me know if this works, if not i will get u the source code.
Here's what I've tried but I can't seem to get it to work. The button stays enabled...