Skip to main content
Inspiring
May 3, 2011
Question

How to throw a JavaScript alert when connection to LMS is lost?

  • May 3, 2011
  • 1 reply
  • 446 views

I've been through all the JS, and I still cannot find a place where I can detect whether or not the connection to the LMS is lost (API).

I can throw an error when it initializes - that's no problem. But I want to be able to throw an alert when the connection is lost while the SWF is playing.

Has anyone done this?

Thanks!

    This topic has been closed for replies.

    1 reply

    Inspiring
    May 5, 2011

    I don't think that there is any "stock" function that does that so you would need to write it yourself.

    You could probably achieve it by writing a function that will check for a value in the LMS and if that fails then display your alert. Pick a SCORM field that you are sure contains data and the fetch the data through JavaScript. If it returns a value then do nothing but if it doesn't return a value then display the alert.

    Trouble is that you would either need to make the funtion run a timed loop or call it manually from each of your slides (perhaps on slide enter or slide exit).

    /Michael


    Visit my Captivate blog with tips & tricks, tutorials and Widgets.