Exclusive API for Button Widget

  • Last update:April 10, 2025
  • Version

    VersionFunctional Change
    11.0

    Difference from V10.0:

    Added the doClick API.

    iconNote: 
    The following API cannot be used in the FVS visualization dashboard.

    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();

    iconNote: 
    If an error occurs due to incomplete creation of the report block object after adding the event, you can add a delay function to postpone the execution.

    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

    66.gif

     Mobile TerminalThis API is supported on mobile terminals.


    Attachment List


    Theme: Secondary Development
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    7s后關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy