Referring to Boolean from 'script' section
Posted: Sun Oct 27, 2019 7:56 pm
Hi there,
I'd be very grateful for some help as i'm stuck again!
I am using MiServer. I have an APL boolean in my Compose function. I need to refer to it from within a scripted section for a conditional action. I've tried along the lines below:
dark← 6 ∊ darklist
Add _.script ScriptFollows
⍝var darknew = document.getElementById ('dark');
⍝ if (darknew) {
⍝....
⍝....
⍝ }
Both of the variables (dark and darknew) appear to be recognised as existing in the scripted section. However it always seems to contain a zero value. The code works fine if I assign the variable value within the scripted section (⍝var darknew = 1)
Many thanks, Jinny
I'd be very grateful for some help as i'm stuck again!
I am using MiServer. I have an APL boolean in my Compose function. I need to refer to it from within a scripted section for a conditional action. I've tried along the lines below:
dark← 6 ∊ darklist
Add _.script ScriptFollows
⍝var darknew = document.getElementById ('dark');
⍝ if (darknew) {
⍝....
⍝....
⍝ }
Both of the variables (dark and darknew) appear to be recognised as existing in the scripted section. However it always seems to contain a zero value. The code works fine if I assign the variable value within the scripted section (⍝var darknew = 1)
Many thanks, Jinny