Page History
...
Scope defines the domain in which code is executed and subsequently determines the namespace by which elements are accessed. Javascript code (functions and variables) may be defined in the following two scopes:
Global Scope: Accessible via the namespace globals, i.e.
Code Block |
---|
globals.createNewCustomer(); // invokes the global method |
...
Form Scope: Accessible via the namespace forms.formName, i.e.
Code Block |
---|
forms.customers.controller.newRecord(); // invokes a form object from another scope |
compared to
Code Block |
---|
function createNewCustomer(){ // a method defined within the 'customers' form scope controller.newRecord(); // invokes the same form object from within the form scope. Notice the fully qualified namespace is not required } |
Overview
Content Tools
Activity