Forum Discussion
Help with Java Script to format numbers
When using Javascript and Storyline variable exact spelling is key ! So make a habit of always using a similar approach on naming custom variables. Either use camelBack notation... so something like this... mycustomVar or just all underscore...any way you want...but do stick to a similar method allways. That makes it easier to ensure variable names will allways be the same.
Because that was the issue on your first slide and the calculate button.
Also make it a habit to test using the console ( F12 or CTRL+Shift+I in the browser )
When doing that you immediately see errors. As you can see in the message in the console...
'Path did not resolve at: txtDepAmt'.. This means Storyline cannot find the variable called txtDepAmt
And when you open up your variable window in Storyline, you notice it is called 'TxtDepAmt'
The capital T at start is different, and thus that variable is not recognized. Changing that and it works nicely. Although on your slideLayer when clicking Next some other error pops up. Not sure what that is about.
Related Content
- 10 months ago
- 8 months ago
- 5 months ago
- 2 months ago