Forum Discussion
99 Practical Examples of Javascript in Storyline
Is there something basic missing in these examples? None of them are working for me on publishing, which is weird. I was just copy/pasting in the functionality as is to test and examine it.
Testing with a button to add one to a count using the ++ function, using the counter timer, and setting today's date (which returns as 00/00/00).
I have used other javascript before such as Matthew Bibby's timer count down, and setting alerts, and built in SL variables pretty extensively before so I sort of know what I'm looking at. I also tried typing in the js in case some weird script was copying with the text and pasting into storyline. Bit Mystified...
Hi Amy! Can you post or send me your Storyline. I'll take a look.
- AmyHengst-2af3d6 years agoCommunity Member
Thanks Zsolt! I mostly got it working, now, only I'm not quite sure what I changed that worked. It seemed like a missing or added space, and maybe I had some bad code on one slide that interfered with code on the other pages. Is that possible that SL looks ahead and if there is a broken script it interrupts the other scripts? Thanks for offering to help me out!!
- ZsoltOlah6 years agoSuper Hero
Amy,
Great! Yes, my very first advice to anyone is ALWAYS open the developer window in your browser and see if there's anything in the Console. One single issue can stop any JS on the page but you won't see any error unless you look at the Console messages. Red is bad. Yellow is warning (for example, when you try to set a variable that does not exist in SL or the upper/lower case does not match it's a yellow warning but it might stop any other scripts running).