Forum Discussion
DavidBaird-5911
21 days agoCommunity Member
Javascript won't execute on one particular slide
I have one particular slide that won't execute JavaScipt.
I created a button which should show a JavaScript alert when pressed. It doesn't.
However, if I copy the button and paste it on another slide it works.
Any ideas? Could the slide be corrupt?
Sorry everyone...problem solved. There was a missing ( in the JavaScript. This error was stopping all other JavaScript running on the slide.
let numSR = Number(player.GetVar"SR1")); should be... let numSR = Number(player.GetVar("SR1"));
Lesson learnt, double check your syntax.😆
1 Reply
- DavidBaird-5911Community Member
Sorry everyone...problem solved. There was a missing ( in the JavaScript. This error was stopping all other JavaScript running on the slide.
let numSR = Number(player.GetVar"SR1")); should be... let numSR = Number(player.GetVar("SR1"));
Lesson learnt, double check your syntax.😆
Related Content
- 3 months ago
- 5 months ago