Using LMScommit and javascript to detect internet connection

Nov 23, 2016

What I am trying to do is that once a user clicks a button, 1 of 2 things will happen.

1. If LMScommit returns true (they are connected to the internet), then they will be moved to a success slide.

OR

2. if LMScommit retrns false (they are not connected to the internet, then they will be moved to a failed slide.

 

The script I am using is,

var player = GetPlayer();
var LMScommit = LMSGetValue("API.LMScommit");
if (LMScommit == "false")
{
player.SetVar("internet", false);

 

What I want this script to do is, if LMScommit=fail, change variable "internet" to false.  However, it is not working.

Help would be much appreciated.

Thank you!

3 Replies

This discussion is closed. You can start a new discussion or contact Articulate Support.