You need to sign in to do that
Don't have an account?
Luis Antonio Aguilar Rosales
What is the difference between these two ways of call a remote method
Hi Guys, I hope you can help me, I only want to know what is the diference beween invoking a remoted method using this statment
RemoteClass.remoteActionMethod(str,function(result, event){ if (event.status) { alert(result); } } );
versus this one
Visualforce.remoting.Manager.invokeAction(
'{!$RemoteAction.RemoteClass.remoteActionMethod}', ......
RemoteClass.remoteActionMethod(str,function(result, event){ if (event.status) { alert(result); } } );
versus this one
Visualforce.remoting.Manager.invokeAction(
'{!$RemoteAction.RemoteClass.remoteActionMethod}', ......
RemoteClass.remoteActionMethod(str,function(result, event) is just "simpler" (without using the remoting manager explicitely).
The documentation almost always uses the Visualforce.remoting.Manager.invokeAction but that is not mandatory.
Behind the scene, there is always the Visualforce.remoting.Manager that is used.
https://salesforce.stackexchange.com/questions/161855/what-happens-behind-the-scenes-of-salesforce-remoting/161867
There is another property for Visualforce.remoting : Visualforce.remoting.timeout = 120000; // Set timeout at page level