JS とパラメータ解析

  • 作成者:ayuan0625
  • 編集回数:12次
  • 最終更新:FRInternational 于 2021-02-05
  • I. Description

    When you click the hyperlink, you can also call a JS script and pass parameters to the JS script as shown in the following examples.

    Formatting code is to make the code look good and display the code according to the specification. Many people do not pay attention to the layout structure of the program when they write the program. Although this will not affect the function of the program, the readability of the program will be greatly reduced.

    II. Example - hyperlink to Baidu and transfer value as an example

    Add a hyperlink to the cell, then select JavaScript, add parameter id, select formula for ID value: = $$$, and add JS as follows:

    截屏2021-02-05 上午10.50.22.png

    JS code:

    window.open("https://www.baidu.com/s?&wd="+id);

    III. Example - hyperlink to template and pass value

    Add a hyperlink to the cell, then select JavaScript, add the parameter area, the value of area is string: East China:

    截屏2021-02-05 上午10.57.16.png

    JS code:

    window.open("http://localhost:8075/webroot/decision/view/report?viewlet=GettingStartedEN.cpt&area=" + area);

    Save the template, and the preview effect is as follows:

    Kapture 2021-02-05 at 11.04.04.gif



    IV. Template download

    For completed templates, please refer to:

    %fr_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\ReportApplication\FeaturesApplication\JSPassing.cpt

    Click to download the template: 

    JSPassing.cpt


    Attachment List


    Theme: 帳票機能応用
    既に最初
    既に最後
    • Helpful
    • Not helpful
    • Only read