Javascript Editor bug

Hello !

I have a strange bug I can’t explain !
This is in the constrain function, on the last line, I wrote : hypeDocument.getElementById(‘txtAcc’).innerHTML = currentAcc+‘𝛿’;
But, when I try a preview in Safari, the Javascript console stop on this error :
TypeError: null is not an object (evaluating ‘hypeDocument.getElementById(‘txtAcc’).innerHTML = currentAcc+‘𝛿’’)
I don’t know where come from the ‘’) at the end of my line ? …
I tried to relaunch Safari and Hype and it doesn’t solve the pb …

Here my code :
20200201 ZVBSN.hype.zip (45.6 KB)

Thank you for your help !

sounds like the element with id ‘txtAcc’ does not exist …
i’m not on a mac, so i can not test.

guess:
perhaps a spelling-issue¿

1 Like

I found the solution !
The pb concerned the use of the greek delta ‘𝛿’ directly in the editor
I replace it withe the JS code \u03b4 and it works fine !
It’s strange because there is no problem, 2 lignes above, with the ‘△’ perfectly recognized by the editor !

well, if you struggle again:
in your provided file the element with id ‘txtAcc’ does not exist. instead there is an element with id ‘TxtAcc’. js is casesensitive …

1 Like

Yes you’re right but even fixed, a bug was still present due to the literal Delta !