Action Javascript in the Grid
Description
Action Javascript adds functionality to your app by defining behaviors using property sheets. The code required to perform the actions is generated for you. These articles cover a wide variety of Action Javascripts available in the Grid Component..
- Advanced Export to Excel, Word, HTML, or Ascii using a Report Definition
Export data to Excel, Word, HTML or Ascii using a Report Definition.
- Ajax Callback
Define a user-defined ajax callback. The callback can be handled by an Xbasic function that is defined in the component, by a separate .a5w page, or by another page (.e.g., .php, .asp, etc.).
- City, State Lookup from Zip Code
For a given zip code, lookup the city and state on the USPS web site and fill in the city and state in the current record.
- Export to Excel or Ascii or Custom Format
Export data to Excel or Ascii or Custom Format. The Custom format option allows you to define an Xbasic function that creates the file.
- Fade Out Message
The Fade Out Message action displays a message on the screen for a short period of time. The message fades away after a specified duration.
- File Download
Download a file from the server to the user's machine.
- File Upload
Upload a file to the server and store a reference to the file in a Grid field, or embed the file in a Drid field.
- File Upload - User Defined
Upload one or more files to the server. A server-side event then gets called to allow you to process the uploaded files.
- Geocode an address
Makes an Ajax callback to a web service to geocode an address. Fill in the latitude and longitude fields in the current record with the information.
- Geolocation Functions
Get geolocation information from the browser and store information in the current Grid/UX component object (e.g. if you are in a Grid, the data is stored in the {grid.object}.geoLocation object). (Requires an HTML5 browser).
- Global Search and Replace
Search and replace values in a field in all currently visible rows in the Grid.
- Global Update
Set the value in a field in all currently visible rows in the Grid.
- Google Map Method
The Google map method action calls a method to perform some action on a Google Map.
- Image Upload
Upload an image file to the server.
- Import Data from Excel or Ascii file
Upload an Excel or Ascii file and import data into the current Grid or an external table.
- Inline-Javascript
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.
- Lock/unlock a container, DIV or entire page (by showing an overlay over it)
Lock a container, DIV or entire page by showing an overlay over it so that the user can't click on the controls under the overlay, or unlock the element.
- Lookup and Fill-in Fields
Lookup values in a table and fill-in fields in the current row from fields in the Lookup Table.
- Menus
Display a dropdown menu.
- Message box
Displays a Javascript alert box on the screen.
- Open a AppLauncher component
Open a AppLauncher component in a pop-up window, or in a DIV on the current page.
- Open a Calendar component
Open a Calendar component in a pop-up window, or in a DIV on the current page.
- Open a Custom component
Open a Custom component in a pop-up window, or in a DIV on the current page.
- Open a Google Map component
Open a Google Map component in a pop-up window, or in a DIV on the current page.
- Open a Grid component
Opens a grid component in a pop-up window, or in a DIV on the current page. This requires first defining a grid component.
- Open a Help Window
Open a window to display a help topic from the Help Table.
- Open a ImageGallery component
Open a ImageGallery component in a pop-up window, or in a DIV on the current page.
- Open a Page Layout component
Open a Page Layout component in a pop-up window, or in a DIV on the current page.
- Open a Pop-up Ajax Window/Overlay
Open a generic, pop-up window (often called an overlay). The window can be modal, or modeless, and can be populated by making an Ajax callback.
- Open a Report, Label or Letter layout
Displays a report, label or letter layout as a PDF file using the Acrobat PDF reader. The report is displayed in either a pop-up window or in a DIV on the current page.
- Open a UX as an alternate editing view for current record
Open a UX component in a pop-up window, or in a DIV on the current page, to edit the record currently being edited in the Grid or UX component.
- Open a UX component
Opens an UX component in a pop-up window, or in a DIV on the current page. (Only new Ajax components can be opened. Old dialogs built in V10 and earlier are not supported.
- Open a UX component to Edit Current Record in Grid, or add a new Record
Open an UX component in a pop-up window, or in a DIV on the current page, to edit the current row in a Grid component or to enter a new record. (Only new Ajax Components can be opened. Old Dialogs in V10 and earlier are not supported.)
- Open a Video Player component
Open a Video Player component in a pop-up window, or in a DIV on the current page.
- Open an .a5w page, static HTML page, URL, or PDF document, in a pop-up window or a DIV
Open a document (including .a5w pages, static .html pages, any other web page, e.g. www.google.com, or PDF document) in a modal, or modeless pop-up window, or in a DIV on the page.
- Run Action
The Run Action runs an action that was defined using Javascript.
- Send email
This javascript action sends an email.
- Set Page Content
Set the content in one or more page elements (i.e. 'divs', 'spans', form fields, etc.) to values obtained from fields in a Lookup Table.
- Toggle display of a container or DIV with animation
Adds toggle animation to a DIV or container. When the action is run the dive or container will be shown or hidden using a specified animation such as 'slide' or 'puff'.
- Web-sockets Server Actions
Performs an action on the web-socket server, such as 'Send a message to the web-sockets server'. The message will be received by all UX and Grid components that are listening for web-socket messages and the 'webSocketOnMessage client-side event in all listening components will fire.
- Zip Code Lookup from Address
For a given address, lookup the Zip code on the USPS web site and fill in the current record.