I'm trying to use the Active Choice Reactive Reference Parameter plugin to have an "update button" in my parameterized Jenkins Job. It will call an API and get the values but for now I have a simple js that update a cell in the html table with a new value. I have tested the button and the javascript outside of Jenkins and it works fine. But when I add this to Jenkins and click the button it starts the Jenkins Job instead of updating the cell.
Sample Groovy used:
upHTML=
'''
<!DOCTYPE html>
function update(){
// Get all the rows of the table
var rows = document.getElementById("tb1").rows;
var r= "0"
var c= "1"
var col = rows[r].cells;
// Target row with the target col (target cell) changed with the new value
col[c].innerHTML = "New Value";
}
</script>
'''
return upHTML
The button is visible but it starts the Jenkins job as soon as it's clicked.