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

Problem with <apex:actionFunction>

Hello there,


I am calling an <apex:actionfunction> from Javascript and it is giving error.


<apex:actionFunction name="showPrtnerList" action="{!ConfirmZip}" rerender="partnerOrgByZip,partnerListId" status="actionStatus">
     <apex:param name="field" value="" assignTo="{!StrZipCode}"></apex:param>

<apex:inputText value="{!MailingPostalCode}" id="PostalCodeE" styleClass="textBig" onblur="javascript&colon;showPrtnrLst('{!$Component.PostalCodeE}');"/>


onBlur event of <apex:inputText> is causing to call Javascript function:


function showPrtnrLst(field)
                var StrZipCode = '';
                StrZipCode = document.getElementById(field).value;


The above method is getting called. The actionFunction "showPrtnerList" is also getting called. Coz, alert(1); is also getting executed.


The method related to <apex:actionFunction> is not working fine.


Please help.


Thank you in advance.



Could you post the error being thrown ? Hope the method "ConfirmZip" is a public method and the variable "StrZipCode" is defined and has a get set in the apex controller.

Yes they both are public. The exception is 500 - Internal Server Error.