Visualforce.remoting.Manager.invokeAction( 'fully_qualified_remote_action', invocation_parameters );
The fully qualified remote action is a string that represents the complete path to the remote action method, including namespace, base class, and so on: namespace[.BaseClass][.ContainingClass].ConcreteClass.Method. Use $RemoteAction in an expression to automatically resolve the namespace, for example {!$RemoteAction.MyController.getAccount}.
<script type="text/javascript"> function getRemoteAccount() { var accountName = document.getElementById('acctSearch').value; Visualforce.remoting.Manager.invokeAction( '{!$RemoteAction.MyController.getAccount}', accountName, function(result, event){ if (event.status) { document.getElementById('acctId').innerHTML = result.Id document.getElementById('acctName').innerHTML = result.Name; } else if (event.type === 'exception') { document.getElementById("responseErrors").innerHTML = event.message; } else { document.getElementById("responseErrors").innerHTML = event.message; } }, {escape: true} ); } </script>
Errors encountered when calling invokeAction are reported only in the JavaScript console. For example, if $RemoteAction finds matching @RemoteAction methods in multiple namespaces, it returns the first matching method and logs a warning to the JavaScript console. If a matching controller or action is not found, the call silently fails and an error is logged to the JavaScript console.