diff options
author | coderick14 | 2017-05-23 17:34:02 +0530 |
---|---|---|
committer | coderick14 | 2017-05-23 17:34:02 +0530 |
commit | 1fa3368b4662163e6652d5524a0c75bd836705f9 (patch) | |
tree | 0b4841173d22c6cf849c009b343a6b1915567cf1 /templates/admin/testexp.html | |
parent | fb6c70cf1e053688002df3cca4ff0cec8deb8b38 (diff) | |
download | SBHS-2018-Rpi-1fa3368b4662163e6652d5524a0c75bd836705f9.tar.gz SBHS-2018-Rpi-1fa3368b4662163e6652d5524a0c75bd836705f9.tar.bz2 SBHS-2018-Rpi-1fa3368b4662163e6652d5524a0c75bd836705f9.zip |
Update max limit for fan and heater on client side
Diffstat (limited to 'templates/admin/testexp.html')
-rw-r--r-- | templates/admin/testexp.html | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/templates/admin/testexp.html b/templates/admin/testexp.html index aac5657..880f081 100644 --- a/templates/admin/testexp.html +++ b/templates/admin/testexp.html @@ -90,6 +90,7 @@ } function setParams() { + var MAX_VALUE = 100; var selected_machine = document.getElementsByClassName("highlight"); if (selected_machine.length == 0) { alert("Please select a machine first"); @@ -99,9 +100,9 @@ var fan_value = document.getElementById("fan_val").value; var heater_value = document.getElementById("heater_val").value; - var isInputOK = !isNaN(fan_value) && fan_value >=0 && fan_value <= 250 && !isNaN(heater_value) && heater_value >=0 && heater_value; + var isInputOK = !isNaN(fan_value) && fan_value >=0 && fan_value <= MAX_VALUE && !isNaN(heater_value) && heater_value >=0 && heater_value <= MAX_VALUE; if (!isInputOK) { - alert("Please enter a value between 0 and 250"); + alert("Please enter a value between 0 and " + MAX_VALUE); return; } |