JavaScript remoting in Visualforce allows you to call methods in Apex controllers from JavaScript.

JavaScript remoting has three parts:

  • 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 few differences from normal action methods.
  • The response handler callback function you add to or include in your Visualforce page, written in JavaScript.

Useful Documentation