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

Rendered Select Option list on select of first Select option list value

Hello All,

I am facing one problem while rendering the select option list.


What I am trying to acomplish is I have one select option list called Visa status shich is having 

two options (values) "Yes"  & "No" . Initially there is only on selectoption list i.e Visa Status  on my page.

Now when I will select "Yes" the Other selectoption list i.e Visa Type should be rendered n populated with three values H1B,L1

and B1 just below the Visa  Status slect option list.When I will select "No" the rendered Visa Type list should

be disappear from the page.


 Please guide me how i will achive this ...



I hope somebody must be having the solution for this.....



Thanks ,





<apex:selectList value="{!test}" multiselect="false" size="1" id="cntry">
  <apex:actionSupport event="onchange" action="{!actiontoPerform}" rerender="divVal" status="status" />
    <apex:selectOptions value="{!TestOptions}" id="testOpt"/>                                            


<apex:outputPanel id="divVal">
                                                <apex:actionstatus id="status">
                                                    <apex:facet name="start">
                                                       <!--When the AJAX Starts->

                                                    <apex:facet name="stop">
                                                       <apex:pageBlock >
                                                       <apex:outputPanel rendered="{!ival=true}">
                                                            <apex:selectList value="{!testValues}" multiselect="false"
                                                                size="1" styleClass="list_box" style="width: 195px;" >
                                                                <apex:selectOptions value="{!ListPopulate}"
                                                                    id="states1" />
                                                        <apex:outputPanel rendered="{!ival=false}">
                                                            <apex:outputText value="testOutput"
                                                            maxlength="30" onblur="this.value=this.value.trim()"/>


I think this should solve it. 


Go through the VF GUIDE  present in theWiki.It has detailed examples regarding the same.


Hi Sandip,


I am also facing the same problem . It is not working to me. Please help me how to resolve this .