Inline-Javascript

Description

Allows developer to enter javascript code. Unlike most other actions there are no properties to check for the Inline-Javascript action, just the code you want to fire.

images/ij.png

Used with the Grid, UX, AppLauncher, and Custom components

Simple Javascript Alert Box

  1. In the UX Builder on the UX Controls page open the 'Other Controls' menu and click on the [Button] option to add a button control to the component.

    images/ij2.png
  2. In the properties list on the right in the 'Javascript - (Touch, Mouse, Pointer Events)' section click on the [...] button next to the 'click' property.

    images/ij3.png
  3. Select the 'Action Javascript' button and click the 'Add New Action' button.

    images/ij4.png
  4. Type 'javascript' into the 'Filter list' and select the 'Inline-Javascript' action.

    images/ij5.png
  5. Add a simple alert to the In-line Javascript editor. Click OK and Save.

    alert('Javascript');
    images/ij6.png
  6. Run the component in Live Preview. When you click the button the Inline Javascript should fire.

    images/ij7.png

See Also