Skip to main content
Known Participant
January 4, 2016
Question

Close button - confirmation message ?

  • January 4, 2016
  • 1 reply
  • 204 views

Hello,

how can make a confirmation message when the learner click via the close button or the cross browser ?

And in the leaving training, a backup is sent I want to show an error message to inform the learner if the backup failed.

(I used Scorm1.2)

Thanks for your help.

This topic has been closed for replies.

1 reply

TLCMediaDesign
Inspiring
January 5, 2016

You can add this to the index.html in the head.

window.onbeforeunload = function ( e )
{
  var message = "Your confirmation message goes here.",
  e = e || window.event;
 
  if ( e )
  {
e.returnValue = message;
  }

  return message;
};

Not sure what "backup" you are speaking of, but you can always include that script before the confirmation actually happens and display the result in var message = backup return value.