Mobile Javascript Not Working
Jul 20, 2020
By
Jesse Sutton
Hi everyone!
I am creating a course that includes the mobile calculator posted here. I've updated and customized some of the Javascript, and it runs perfectly on desktop.
However, when I publish to mobile, trying to generate a date results in an "undefined NaN" error. I have turned off AMP but still get this error. Again, the Javascript works perfectly on desktop, so I know the error is not within the code itself (unless I need to add something specific for mobile).
Any assistance greatly appreciated. Thank you!
11 Replies
The mobile app does not support javascript. Otherwise it should just work
Hi Phil - That's correct; we un-check the "Use Articulate Mobile Player..." option when exporting but are still encountering the issue when published in mobile.
Have you checked the developer console fro any errors
I checked on my computer, using Google Chrome's dev tools. Didn't see an error populate.
I attached an example here. Thanks for your help.
Where /how do you do this? Inquiring minds wish to know.
When exporting, click the item to the right of Formats within Properties. Then, uncheck the AMP option at the bottom.
If you use classic player you get the option on the publish dialogue
Sent from my iPhone
Hi Phil - any thoughts on the file I attached?
Hi Jesse,
Take a look at this story file.
When initialising your dates you should provide a year as well. Some browsers will give the date a default year and some browsers do not.
I also noticed that a couple of Storyline variables were missing:
Date10WeeksBack and Date15WeeksBack.
Hi Russell - that appeared to be the solution! Thank you so much.
This discussion is closed. You can start a new discussion or contact Articulate Support.