Forum Discussion
A quick look at my javascript
I would be grateful for someone with more expertise than I to see what I'm doing wrong in the attached file. It is a questionnaire where questions in scenes 1 and 2 fill number variables.
In scene 3, in slide 3.1, with the JS in the trigger: in Lines 2 - 12 I get these into JS variables.
In lines 13 - 18 I sum various of these and calculate a percentage value. I put the result into three further project variables; I display them on slide 3.2, and all seems to work.
In lines 14 - 26 I do the same with further perms of calculations. Seemingly in exactly the same way. I display these further project variables in slide 3.3. However nothing seems to be calculated!
John Faulkes
Hi John, a quick check you have two undefined variables Q7 and Q10, presume these should be Qu7 and Qu10 line 19 and 21
2 Replies
- PhilMayorSuper Hero
Hi John, a quick check you have two undefined variables Q7 and Q10, presume these should be Qu7 and Qu10 line 19 and 21
- johnfaulkesCommunity Member
You are a proper super hero Phil, thanks, that fixed it.
Every so often I realise why I have spent my career training scientists and not being a scientist; my attention to detail is all the explanation needed!
Cheers
John.a.