Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Close button - confirmation message ?

New Here ,
Jan 04, 2016 Jan 04, 2016

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.

186
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jan 05, 2016 Jan 05, 2016
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources