Hi There,
may i know how do we get the value of single line of text which has the JavaScript client ID of resultText and calculated value’s ID is calcResult. However the line of $("#" + "calcResult").val(minValue); However, it does not solves the issue. Is there any suggestions?
function calculatelowest() {
var stringValue = NWF$("#" + jsarrayinteger).val();
if (stringValue.trim() === "") {
alert("Input is empty. Cannot calculate CPI Score");
return;
}
var numberArray = stringValue.split(',').map(Number);
if (numberArray.some(isNaN)) {
alert("Invalid input. Please provide a valid list of numbers separated by commas.");
return;
}
var minValue = Math.min(...numberArray);
// alert(minValue);
NWF$('#' + resultText).val(minValue);
$("#" + "calcResult").val(minValue);
}