Hi Simrin, you can make use of onComplete attribute available on commandButton, actionSupport,actionFunction, pageBlockButton to call the java script method after completion of the controller method specified in action attribute
Hi Simrin, you can make use of onComplete attribute available on commandButton, actionSupport,actionFunction, pageBlockButton to call the java script method after completion of the controller method specified in action attribute
I have something like this, Want to call two javascript, Search('{!$Component.id1}'),and clear(); but cleart should be executed after the Search('{!$Component.id1}'),
Search calls the action fucntion,which in turn call the Controller function.
I ttied to execute, Serch and Clear, one after other but they are both called before the ewxectuion of backend code
Then add onComplete="clear();" in ActionFunction like <apex:actionFunction name="action functionName" action="ControllerMethod" onComplete="clear();" />
Refer the below code snippet
In the above code snippet, java script method "javaScriptMethod" will be called after completeion of "controllerMethod" specified in action attribute
Regards,
Bhanu Mahesh
All Answers
Refer the below code snippet
In the above code snippet, java script method "javaScriptMethod" will be called after completeion of "controllerMethod" specified in action attribute
Regards,
Bhanu Mahesh
I have something like this, Want to call two javascript,
Search('{!$Component.id1}'),and clear(); but cleart should be executed after the Search('{!$Component.id1}'),
Search calls the action fucntion,which in turn call the Controller function.
I ttied to execute, Serch and Clear, one after other but they are both called before the ewxectuion of backend code
<apex:actionFunction name="action functionName" action="ControllerMethod" onComplete="clear();" />
Regards,
Bhanu Mahesh