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
Board salesforceBoard salesforce 

Rendering outputpanel using action fucntion

Hi All,
please help me out 
i want to render the output panels based on the  selected picklist values using action function ? 

Thanks ,
Ram
Board salesforceBoard salesforce
Hey all that mean i want to rerender panels using action fucntion ?
Naresh YadavNaresh Yadav
Hi Board salesforce

Use the below code.
 
<apex:page standardController="Account">
	<apex:form>
		<apex:actionFunction name="changePanel" reRender="panel1,panel2,panel3"/>
		
		<apex:inputField value="{!Account.Rating}" onChange="changePanel();"/>
		
		<apex:outputPanel id="panel1" render="{!IF(Account.Rating == 'Warm',true,false)}">
			Rating is warm.
		</apex:outputPanel>
		<apex:outputPanel id="panel2" render="{!IF(Account.Rating == 'Cold',true,false)}">
			Rating is cold.
		</apex:outputPanel>
		<apex:outputPanel id="panel3" render="{!IF(Account.Rating == 'Hot',true,false)}">
			Rating is Hot.
		</apex:outputPanel>
	</apex:form>
</apex:page>
Hope this will help.
Peace.