Connecting to the API
Embedding API Calls in JavaScript
Processing Results
SOAP (AJAX) API End-of-Life Policy
SOAP Header Options with the AJAX Toolkit
Error Handling with the AJAX Toolkit
Previous Versions
Most JavaScript that you add to Visualforce pages, buttons, or links has three sections: first, connecting to the AJAX Toolkit, next, embedding the API methods in JavaScript, and finally, processing the results. This section explains each of these steps.
The first portion of any JavaScript code that uses the AJAX Toolkit must make the toolkit available to the JavaScript code. The syntax for this is different depending on whether you are embedding JavaScript in a Visualforce page, or a button or link.