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
sultansultan 

using Action function we can invoke a method from java script and also by Action support?so when should we go for both these two if both have same functionality?plz help me?

RadnipRadnip
I don't know what you mean. Do you mean the Salesforce pubisher Actions? or Visualforce actions? What do you mean by "Action support"?
Prem_PalPrem_Pal
Both are somewhat different and have different purpose:

ActionFunction
A component that provides support for invoking controller action methods directly from JavaScript code using an AJAX request.

You can use this when you want to invoke a controller method from your JS code.(By JS code, I mean a code written within <script></script> tags.)


ActionSupport
Adds AJAX support to another component, allowing the component to be refreshed asynchronously by the server when a particular event occurs.

You can use this when you want to invoke say a controller method on some event like "onclick". You cannot call the method defined in action attribute from any JS code of your page using actionsupport.