You need to sign in to do that
Don't have an account?
Swamy P R N
Unable to pass a parameter by a actionfunction
Hi Buddies,
I was not able to pass the parameters via actionfunction to the controller. Even controller is not executed by clicking the button. Please check it and let me know where i need to change.
VF Page:
<apex:commandButton value="Next" style="width:90px;margin-left:360px;" onclick="changeValue();"/>
<script>
function changeValue() {
var c=document.getElementById("mradio").value;
priorityval(c);
alert(c);
}
</script>
<apex:actionFunction name="priorityval" action="{!runPriority}">
<apex:param name="priorityname" value="" assignTo="{!priorityname}"/>
</apex:actionFunction>
Class:
public string priorityname{get;set;}
Public Pagereference runPriority(){
System.debug('Priority Value@@@'+priorityname+'**RecrdTypeId**'+recrdtypeid);
PageReference pgRef=new PageReference('/apex/CasePage?RecordType='+recrdtypeid+'&priority='+priorityname);
pgRef.setRedirect(true);
return pgRef;
}
Please advice me, Thanks in advance!!
I was not able to pass the parameters via actionfunction to the controller. Even controller is not executed by clicking the button. Please check it and let me know where i need to change.
VF Page:
<apex:commandButton value="Next" style="width:90px;margin-left:360px;" onclick="changeValue();"/>
<script>
function changeValue() {
var c=document.getElementById("mradio").value;
priorityval(c);
alert(c);
}
</script>
<apex:actionFunction name="priorityval" action="{!runPriority}">
<apex:param name="priorityname" value="" assignTo="{!priorityname}"/>
</apex:actionFunction>
Class:
public string priorityname{get;set;}
Public Pagereference runPriority(){
System.debug('Priority Value@@@'+priorityname+'**RecrdTypeId**'+recrdtypeid);
PageReference pgRef=new PageReference('/apex/CasePage?RecordType='+recrdtypeid+'&priority='+priorityname);
pgRef.setRedirect(true);
return pgRef;
}
Please advice me, Thanks in advance!!
All Answers
The script is also executing, i tried with alert boxes. Over in the alert box the value is populating correctly but it is not passing via actionfunction method that means, " priorityval(c); "
Am not able to pass the parameter to that actionfunction method, i face the issue over here. Plz update me with your suggestions.