Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  14 Oct 2022, Lars Martin, Suggestion, Allow onchange to refer to arbitrary js function 
    Reply  14 Oct 2022, Ben Smith, Info, Allow onchange to refer to arbitrary js function 
       Reply  22 Oct 2022, Lars Martin, Info, Allow onchange to refer to arbitrary js function 
          Reply  22 Oct 2022, Lars Martin, Info, Allow onchange to refer to arbitrary js function 
Message ID: 2442     Entry time: 22 Oct 2022     In reply to: 2440
Author: Lars Martin 
Topic: Info 
Subject: Allow onchange to refer to arbitrary js function 
Actually, now that I look again, there is a mistake in the instructions:
you say

onchange="this.dataset.color=check_therm(this)"

but check_therm doesn't return anything and instead changes the color itself. So you either want the function to return the string and use the above assignment, or use the function you provide and use

onchange="check_therm(this)"
ELOG V3.1.4-2e1708b5