Javascript does not export
Jan 22, 2015
Maybe I am saying this incorrectly but I havn't found an answer so hopefully I can get some from posting.
My storyline file was working properly with the javascript I put in. Then randomly it stopped. It didn't matter what code I put in, the .html will not execute any javascript whatsoever. I have updated Storyline and flash, still nothing.
I am using a dropbox public folder to test my exports.
Is it possible that there is a setting somewhere that disables javascript when I export? Is there something I can do to get it working again or do I have to re-create my storyline file?
9 Replies
Through process of elimination, my draw from questions scene seems to be the culprit. I used a simple alert('Hello, World!') on the next button. I deleted a single scene to see if it would work and as soon as I deleted my questions scene it worked just fine.
This may need to be fixed in the next patch.
Fixed...
When it comes to scripting, I have no idea what I am doing. It's all trial and error. I will leave this here in hopes that it helps someone in the future.
In my draw from questions scene I found some old javascript that I was trying to use.
window.location.pathname.lastIndexOf("/") + 1) = "/stuff went here/stuff went here/story.html";
apparently this code will cause all of the javascript in the entire file to stop working. I am not sure if that goes for any javascript that is improperly used or not.
Hello Caitlyn,
Welcome to the community! Thanks for your updates, glad you got this fixed, and hopefully others will be able to use this information!
Thanks Caitlyn for sharing additional information here - I know Javascript is an issue for a lot of users, and since it's not something we can offer support for it's always good to have additional examples.
a single javascript error will break all the javascript in the project
I noticed that thank you!
Ashley do you think this could be added to the best practices, as it may help with troubleshooting
Hi Phil,
Definitely a good idea - and I can pass it along to see about getting the documentation updated.
Maybe you already figured it out, but I think something is wrong with the parentheses, there is one just hanging without a beginning parentheses
window.location.pathname.lastIndexOf("/") + 1) = "/stuff went here/stuff went here/story.html";
So you need to remove the last one I think? so it would be something like
If this is wrong and you already figured out the error I would love to hear the solution, I really like learning more about javascript when I can :)
This discussion is closed. You can start a new discussion or contact Articulate Support.