-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Windows 10 64 bit
java.version 1.8.0_162
Tomcat 9.0.34
Jenkins 2.254
Active Choices 2.4
Firefox 79.0
Here is two parameters:
Param1 - simple single select:
return ['value1', 'value2']
Param2 - formatted HTML:
def tst = "new" html = ''' <html> <body> <input type="checkbox" onClick="Result(this)" /> Select all<br/> <input type="checkbox" name="cbx" value="One" onClick="Result()"/> One<br/> <input type="checkbox" name="cbx" value="Two" onClick="Result()"/> Two<br/> <input type="checkbox" name="cbx" value="Three" onClick="Result()"/> Three<br/> <script> function Result(source) { var checkboxes = document.getElementsByName("cbx"); var result = document.getElementById("result"); result.value = ""; for(var i=0, n=checkboxes.length;i<n;i++) { if (source) checkboxes[i].checked = source.checked; if (checkboxes[i].checked) result.value = result.value + checkboxes[i].value + ","; } result.value = result.value + "''' + tst + '''"; } </script> <input type="text" id = "result" name="value" value="''' + tst + '''"> </body> </html> ''' return html
When Param2 does not use Param1 value, function Result works great:
But when I try to use value of Param1, JavaScript does not work:
def tst = Param1
- duplicates
-
JENKINS-69045 Custom javascript is not working when active choice reactive reference parameter refers other parameter value
- Closed