+ Start a Discussion
Ashok Kumar NayakAshok Kumar Nayak 

ActionSupport event="OnChange" is not working for my inputFieldType

I need to display a panel if the inputField Value get selected. 
And My InputField is of picklist type. 

But the onchange event doesn't fire when the picklist values are changing that's why my rendered condition is failing as well.

Plz share if you found any solution or workarround for this.
Below is code snippet.

<apex:pageblockSectionItem >
                    Type : <apex:inputField id="type" style="width:200px;" required="true" value="{!cse.Case_Type__c}">
                    <apex:actionSupport event="onchange" reRender="blockToRerender"/>

<apex:outputPanel id="blockToRerender">
<apex:pageBlockSection id="pbs2" rendered="{!cse.Case_Type__c=='Some Value'}">
<apex:pageblockSectionItem id="psi1">
                    Description : <apex:inputField id="des" value="{!cse.Description}"/>
                <apex:pageblockSectionItem >
                Answer Provided :<apex:inputField id="ans" value="{!cse.Answer_Provided__c}"/>
Try printing the value of {!cse.Case_Type__c} inside the outputPanel and see if there is any change happening
Ashok Kumar NayakAshok Kumar Nayak
Hi Vineet,
It's coming null if I print it. And still null after I change the value also.
That Input Field is a dependent picklist type.
I tried in this way as well :-

JS Code:--
      function Callmefunc(id)
   var type = document.getElementById(id).value;


Now VF Page Code:-
<apex:actionFunction name="check" action="{!ShowPanel}" reRender="blockToRerender" >
<apex:param name="TypeSelected" value="" />
                    Type : <apex:inputField id="check" style="width:200px;" required="true" value="{!cse.Case_Type__c}" onchange="Callmefunc('{!$Component.check}');"/>
<apex:outputPanel id="blockToRerender" rendered="{!display==true}"></apex:outputPanel>

Then in Controller:
public static boolean display{get; set;}
public void ShowPanel(){
 if(act=='Request for Information'){

Now If I try to print the value of "display" it's printing false also.

Please suggest if you can find any solution for this. Thanks is Advance.