Version
Version | Functional Change |
---|---|
11.0 | Difference from V10.0: Added the doClick API. |

Before API use, read JS API Compatibility Description carefully. APIs are supported in both general reports and dashboards (new version) by default.
doClick
API | doClick() | To trigger the Click event of the button widget, equivalent to a manual click. |
---|---|---|
Parameter | - | - |
Returned value | void | |
Example | Example 1: You can trigger the Click event of the button when the obtained button widget object is defined as button. button.doClick(); Example 2: In a general report, you can trigger the Click event of the button named button0 on the parameter panel. _g().getParameterContainer().getWidgetByName("button0").doClick(); Example 3: In a general report, you can trigger the Click event of the button named button0 in the data entry cell. _g().getWidgetByName("button0").doClick(); Example 4: In a dashboard, you can trigger the Click event of the button named button0 in body. _g().getWidgetByName("button0").doClick(); ![]() setTimeout(function() _g().getParameterContainer().getWidgetByName("button0").doClick(); }, 500); | |
Application Example | You can set the report to be queried automatically after two seconds (no need to click the query button). For details, you can download the template Automatic Click Event Trigger for Button Widget.cpt | |
Mobile Terminal | This API is supported on mobile terminals. |