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

input field (disabled then enabled) is not sending value to controller
Hi,
In Visualforce I have two select fields, first select is enabled and second is disabled (="true"), based on the selection from first select the 2nd will be enabled using javascript. After I click on submit I'm not getting value for 2nd though its enabled. So how can I send 2nd select value to controller?
Please advice...
Thanks.
In Visualforce I have two select fields, first select is enabled and second is disabled (="true"), based on the selection from first select the 2nd will be enabled using javascript. After I click on submit I'm not getting value for 2nd though its enabled. So how can I send 2nd select value to controller?
<apex:page controller="PhotoApprovalController" showHeader="false" standardStyleSheets="true" sidebar="false"> <script type="text/javascript"> function enableRejectReason(status,optionReject){ var selectiontStatus = document.getElementById(status).value; if (selectiontStatus=="Reject") document.getElementById(optionReject).disabled=false; else document.getElementById(optionReject).disabled=true; } </script> <apex:define name="body"> <center> <apex:pageMessages /> <apex:panelGrid bgcolor="white" columns="2"> <apex:image url="{!photoURL}" height="150" width="150"/> <apex:panelGrid > <apex:form id="theForm"> <apex:panelGrid columns="1" style="margin-top:1em;"> <apex:panelGrid columns="2"> <apex:outputLabel value="Select Status:" for="Name"/> <apex:selectList value="{!pas}" multiselect="false" size="1" id="pas" onchange="enableRejectReason('{!$Component.pas}','{!$Component.prs}')"> <apex:selectOptions value="{!pasOptions}"/> </apex:selectList> <apex:outputLabel value="Select Reason:" for="Rason" /> <apex:selectList value="{!prs}" id="prs" multiselect="false" size="1" style="width:250px;" disabled="true"> <apex:selectOptions value="{!prsOptions}" /> </apex:selectList> </apex:panelGrid> <apex:panelGroup > <apex:commandButton action="{!submit}" value="Submit" id="submit" disabled="{!isSubmitButtonDisabled}" /> </apex:panelGroup> </apex:panelGrid> </apex:form> <br/> </apex:panelGrid> </apex:panelGrid> </center> <br/> </apex:define> </apex:page>
Please advice...
Thanks.
Whereas the "booleanvariable" is from the custom controller used in this VF page. Even though the value from the custom controller for the booleanvariable is false it still disable the inputField.
What are the possible values for the html-disabled while using as passthrough variable.
Any help would be highly appreciated.