JavaScript Remoting for Apex Controllers

Use JavaScript remoting in Visualforce to call methods in Apex controllers from JavaScript. Create pages with complex, dynamic behavior that isn’t possible with the standard Visualforce AJAX components.
Features implemented using JavaScript remoting require three elements:
  • The remote method invocation you add to the Visualforce page, written in JavaScript.
  • The remote method definition in your Apex controller class. This method definition is written in Apex, but there are some important differences from normal action methods.
  • The response handler callback function you add to or include in your Visualforce page, written in JavaScript.
JavaScript remoting allows you to make remote requests to Visualforce.