Skip to main content

Javascript is a weakly typed interpreted programming language primarily implemented by web browsers to allow for client-side scripting. It can be used in Visualforce pages to give a more dynamic experience to end users. Additionally, the Visualforce engine generates and uses JavaScript to support the functionality of some of its components.

Questions relating to the usage of JavaScript within Salesforce or the platform should use this tag.

JavaScript is used in many places throughout Salesforce to give a more sophisticated experience to the end user and can be used directly by programmers primarily within Visualforce pages. Asynchronous communication between the client (web browser usually) and server (Apex controllers usually) is referred to as Ajax and is supported on the client side through the use of JavaScript and can be implemented in Visualforce through the use of components that support rerendering such as apex:actionFunction and through Javascript Remoting.

There are many JavaScript frameworks such as jQuery that encapsulate cross-browser compatibility issues and provide a multitude of commonly used functionality.

Mozilla, Microsoft, and Google have published references on their implementations of JavaScript:

Code Language (used for syntax highlighting): lang-js