Javascript properties allow you to define external Javascript libraries and files that are used by the UX Component. You can also create Javascript Actions: client-side code created with Action Javascript that can be called throughout the UX Component.

Javascript Linked files

You can link one or more external Javascript files in a component using the Javascript Linked files property. Multiple files can be linked to a component.


Specifying a File

You can specify Javascript files to be linked as a comma delimited list in the Properties pane of the UX Component.


Clicking the button opens the Specify the Javascript FIles to Load dialog. In this dialog, you can specify additional properties for a Javascript file, including a function that should be called after the Javascript file is loaded and any special directives. Enter one Javascript file per line in the Specify the Javascript Files to Load dialog.

To call a function after the file is loaded, specify the function name after the filename with a pipe '|' character placed between the name of the file and the function name:


Special Directives

Javascript files are typically loaded after the user-defined Javascript functions are loaded. There are special directives you can use that change this behavior, allowing you to load Javascript files before user-defined functions are loaded or specify that Javascript files be loaded in the <head> portion of the containing .a5w page.

Special Directive

Indicates that the Javascript file should be loaded before the user-defined Javascript functions (defined in the Javascript Functions property) are loaded.


Indicates that the Javascript file should be loaded in the <head> section of the .a5w page that loads the UX Component.


Prevents post-processing of the file contents loaded in the head section in Working Preview.

{BeforeFunctions} Directive

The {BeforeFunctions} directive can be used to load Javascript files before user-defined functions are loaded.

IMPORTANT - Javascript in linked files is loaded asynchronously. That means that even if you specify the {BeforeFunctions} directive for a Javascript file, you cannot necessarily immediately call functions defined in the Javascript file.

{HeadSection} Directive

The {HeadSection} directive will load the Javascript file in the <head> section of the .a5w page containing the UX Component.

  • Notes About the {HeadSection} Directive

    It is meaningless to specify the name of a Javascript function to call after the Javascript is loaded.

  • Javascript that is loaded in the <head> section is loaded synchronously.

  • If the UX Component is opened via an Ajax callback, the Javascript will not be loaded. You need to load the Javascript in the .a5w page that laods the top-most parent component.

  • Contrast the {HeadSection} option with specifying linked Javascript files in the Project Properties. Linked Javascript files specified in the Project Properties are loaded for every .a5w page, whereas this option only loads the Javascript for the .a5w page that runs the component.

{Raw} Directive

Only applies to Working Preview for files loaded using the {HeadSection} directive.

The {Raw} directive only applies if you also have files that use the {HeadSection} directive. When a Javascript file is loaded, additional post-processing is performed to fix image references so they will display correctly in Working Preview. Post-processing also replaces any placeholders, such as {dialog.object}, present in the Javascript file.

If you are linking a large Javascript file, it can slow down the performance of Working Preview. You can prevent this post-processing from happening by including the {Raw} directive. If a Javascript file is loaded with the {Raw} directive, no post-processing will be done in Working Preview.

The {Raw} directive is ignored in all other contexts.

Javascript Actions

Define client-side actions and scripts using the Action Javascript builder.

This is conceptually similar to defining a Javascript function that can be called from event handlers in your UX Component, except that rather than writing the Javascript function by hand, you can use the Action Javascript builders to write the code for you.

Google visualization libraries

The Google visualization libraries property lets you include Google's Visualization Libraries for creating charts in your UX Component. The libraries you specify will be dynamically loaded when the UX Component is loaded. To include visualization libraries, click the button to open the Select Google Visualization Libraries to Load dialog.

The Select Google Visualization Libraries to Load dialog.
It is no longer necessary to go to the Web Project Properties dialog to specify that the Google JSAPI library should be loaded. The Visualization libraries are now loaded automatically by the UX as needed.

The available libraries are listed below:


For creating Area, Classic Bar, Bubble, Candlestick, Column, Combo, Diff, Donut, Histogram, Interval, Line, Pie, Scatter, Stepped Tree, Trendline, and Waterfall charts.


For creating Gauge Charts.


For creating Geo Charts.


For creating Table Charts.


For creating Tree Map Charts.


For creating Org Charts.


For creating Timelines.


For creating more complex Bar and Column Charts, including Material Bar, Material Column, Dual-X, Dual-Y, and Top-X Charts.


For creating a Calendar.


For creating a Gantt chart.


For adding a map visualization.


For creating Sankey diagrams.


For creating word trees.


For creating scatter plots.

To learn more about Google's Visualization Libraries, visit the Google Charts documentation.

Optional system libraries

Alpha Anywhere includes optional system libraries that can be added to the UX Component to provide functionality, such as methods for extracting data from JSON strings.

To add a system library, click the open button for the Optional system libraries property and check the libraries you would like to add. To learn more about the available system libraries, see System Libraries.

HTML5 Image capture

The HTML5 Image capture property defines whether or not Javascript libraries for HTML5 image capture should be included when the UX Component is loaded/deployed.

If the UX Component uses HTML5 to access the camera or photo library on a mobile device (or a desktop web app that is running on a browser with HTML5 image capture support), check this box to ensure the necessary Javascript libraries are loaded.

Keyboard shortcuts

Keyboard shortcuts allow you to invoke actions when one or more keys are pressed.

Keyboard shortcuts can be created for a UX component. The shortcuts can run Javascript Actions, click a button, or execute arbitrary Javascript code.

To define Keyboard shortcuts, click the smart field for the Keyboard shortcuts property in the UX builder.


This will open up the genie where you can define key combinations and the corresponding action for the key combination.



Adding Keyboard Shortcuts to a Component

In this video we show how you can add support for keyboard shortcuts to a UX component. Keyboard shortcuts can speed up a user's interaction with a component. For example, you could configure the Ctrl-S key as a shortcut for saving the data in the a UX.

Download Component