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:
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:
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:
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: