Controls
Button Script
Unlike standard buttons that trigger predefined actions, the Button Script control offers complete freedom to define behavior using JavaScript. Whether modifying data, interacting with APIs, or triggering animations, this control empowers users to extend the capabilities of their visualization with minimal restrictions.
Key Features
Custom JavaScript Execution
- Define a JavaScript function that executes when the button is clicked.
- Perform real-time data manipulations, UI updates, or external system interactions.
Dynamic Interaction
- Modify other elements on the page, update variables, or send commands to external devices.
- Use logic-based conditions to trigger different behaviors based on user input or real-time data.
Seamless Integration
- Works alongside other controls, allowing for fully customized workflows.
- Can be used to trigger MQTT messages, update CODESYS variables, or interact with web services.
Fully Configurable
- Define button labels, colors, and styles to match the UI.
- Easily link JavaScript functions through the eDesign editor without modifying core system code.
Use Cases
Custom Logic Execution
- Perform mathematical calculations, format data dynamically, or apply transformations before displaying results.
External API Calls
- Fetch data from an external source, send requests, or log events when the button is pressed.
Advanced UI Interactions
- Show or hide elements, switch themes, or trigger animations within the interfac