I am currently experiencing an issue with email validation when publishing with HTML5 support. My story.html file works like a charm, but when I access the story_html5.html the validation is not working and my button and some triggers don't work properly.
I'd like to post my project in private due to the nature of the course.
Articulate typically don't offer support for javascript issues and rely on the community for these, you may get some help f you post your troublesome code
Thanks Phil. The code is pretty straightforward. I feel it is an issue with Storyline and not JavaScript. I just cant figure it out.
// for textentry var reg = /[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9-]+(\.[a-z0-9-]+)*/g; var player = GetPlayer(); var email=player.GetVar("storemanager1"); // console.log(email);
var isValidate=false; if (reg.test(email)) { var isValidate=true; } else { var isValidate=false; } player.SetVar("isValidate",isValidate);
After further testing, I found that the values are correct and the JavaScript is working as expected, but the button and triggers are not. See examples below:
One thing it may be is case, I remember a bug where Storyline was not accepting the case of a boolean in the html5, instead of a boolean try using a number variable.
Phil, I took it a step further and was able to get it to work by using a Text variable. Someone should really look into this to help the next poor soul who runs into the same issue with SL2.
Can you share a copy of your .story file and code issue with our Support Engineers here? They'll be able to take a look at the specifics and figure out any next steps in terms of reporting to our team or documenting the behavior.
Thanks Bryan - and I see your support case so I linked it to this forum discussion as well and I'll follow up here once they've also had a chance to take a look.
12 Replies
Articulate typically don't offer support for javascript issues and rely on the community for these, you may get some help f you post your troublesome code
Thanks Phil. The code is pretty straightforward. I feel it is an issue with Storyline and not JavaScript. I just cant figure it out.
// for textentry
var reg = /[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9-]+(\.[a-z0-9-]+)*/g;
var player = GetPlayer();
var email=player.GetVar("storemanager1");
// console.log(email);
var isValidate=false;
if (reg.test(email))
{
var isValidate=true;
}
else
{
var isValidate=false;
}
player.SetVar("isValidate",isValidate);
After further testing, I found that the values are correct and the JavaScript is working as expected, but the button and triggers are not. See examples below:
HTML eLearning example
HTML5 eLearning example
Download Storyline Project
Yes looks like the values are set correctly
One thing it may be is case, I remember a bug where Storyline was not accepting the case of a boolean in the html5, instead of a boolean try using a number variable.
Phil, thanks for your reply. So I tried using a number variable (0=false, 1=true) with the same results. Any other ideas?
Download Storyline Project (Updated February 7th, 2017)
Phil, I took it a step further and was able to get it to work by using a Text variable. Someone should really look into this to help the next poor soul who runs into the same issue with SL2.
Sorry Bryan didn't see the response yesterday. I agree, glad you found a solution.
Sent from my iPhone
Thanks for your assistance Phil. How can I let them know about this issue?
I think you need to raise a support case
Hi Bryan,
Can you share a copy of your .story file and code issue with our Support Engineers here? They'll be able to take a look at the specifics and figure out any next steps in terms of reporting to our team or documenting the behavior.
Sure thing. FYI: I have also opened a support case.
Thanks Bryan - and I see your support case so I linked it to this forum discussion as well and I'll follow up here once they've also had a chance to take a look.
This discussion is closed. You can start a new discussion or contact Articulate Support.