+ Start a Discussion
Sumant KuchipudiSumant Kuchipudi 

input field (disabled then enabled) is not sending value to controller

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")
    <apex:define name="body">  
            <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" 
                                    <apex:selectOptions value="{!pasOptions}"/>
                                <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:panelGroup >
                                <apex:commandButton action="{!submit}" value="Submit" id="submit" disabled="{!isSubmitButtonDisabled}" />

Please advice...

I have a similar situation for a inputField. I'm trying to use the html-disabled={!booleanvariable};
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.