
Hello there, I'm pretty sure i've miss something about Roll20 compatibility, but what ? This JS is working as expected on CodePen for example (<a href="https://codepen.io/spirito35/pen/ExdxpwE" rel="nofollow">https://codepen.io/spirito35/pen/ExdxpwE</a>) but doesn't work when it goes to character sheet :X Thans for your help :( < div id = "sheet-stats1" > < input type = "number" value = "0" name = "attr_ref-calculated" id = "ref" onchange = " updateAcValue ()" > < input type = "number" value = "0" name = "attr_nat-calculated" id = "nat" onchange = " updateAcValue ()" > < input class = "sheet-statistics1" type = "number" value = "0" name = "attr_ac-calculated" id = "ac" > </ div >
< script type = "text/worker" > function updateAcValue() { var natValue = document.getElementById('nat').value; var refValue = document.getElementById('ref').value; document.getElementById('ac').value = Math.max(natValue, refValue); }
< script >