Event Action
Last updated
Last updated
Use the Event Action
block to take an action when the user interacts with elements on a page or form.
This block can be considered a more generic version of the , where you can handle and take an action on any event, not just the Clicked, Double-Clicked, Right-Clicked and Key Pressed events.
Refer to the block for dynamically generated content.
The block comes in two modes which are discussed below.
The Mode 1 version of the Event Action block consists of the following (from left to right, top to bottom):
The Mode 2 version of the Event Action block consists of the following (from left to right, top to bottom):
Some of the common event names are given below:
click
Mouse click on the selected element
contextmenu
Mouse right-click on the selected element
dblclk
Mouse double-click on the selected element
change
keypress
Key press when the selected element is in focus
blur
Selected element looses focus
focus
Selected element gains focus
For a more comprehensive list of event names please refer to:
NOTE: In general, the Event Action
block can be used to handle any event not just the ones mentioned above or in the reference links.
The next image (below) shows an example of the Event Action block (Mode 2). Here the click event is handled and the button's state is set to disabled along with the appending of a status spinner to show that the app is processing some task.
NOTE: Using a CSS selector, you can operate on multiple elements that match the criteria specified by the selector. See the references below for more information:
Event Name: that accepts a value representing the name of the event you want to handle and take an action on. See the for more details.
Element: to choose the element.
Tasks: a where you connect blocks that specify what you want done when the event occurs. Use the block to get more information about the event.
Event Name: that accepts a value representing the name of the event you want to handle and take an action on. See the for more details.
Element: that accepts either a value in the form of a or an value The Element block comes pre-attached for your convenience but can be removed and customized.
Tasks: a where you connect blocks that specify what you want done when the event occurs. Use the block to get more information about the event.
Changes to the selection of a
The image below shows an example of the Event Action block (Mode 1) where the block is used to show a message when the selected button is clicked. This is an exact equivalent of the example shown in the .