Difference between JavaScript Remoting and

Difference between JavaScript Remoting and

The <apex:actionFunction> component also lets you call controller action methods through JavaScript.

In general, <apex:actionFunction> is easier to use and requires less code, while JavaScript remoting offers more flexibility.

Here are some specific differences between the two.

The <apex:actionFunction> tag:


1. lets you specify rerender targets
2. submits the form
3. doesn’t require you to write any JavaScript

JavaScript remoting:


1. lets you pass parameters
2. provides a callback
3. requires you to write some JavaScript

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_js_remoting_compare_actionfunction.htm

Leave a Reply