0

I'm trying to customise the text appears on the exit popup but for some reasons it is not registering the text I supplied.

    window.thisPage = window.thisPage || {};
    window.thisPage.isDirty = false;

    window.thisPage.closeEditorWarning = function (event) {
        if (window.thisPage.isDirty)
            return 'Please save your current RFP draft before proceeding.' +
                   ' - if you leave before saving, then your changes will be lost.'
        else
            return undefined;
    };

    $("form").on('keyup', 'textarea,input,select', 
                 function () { 
                     window.thisPage.isDirty = true; 
                 });

    $("form").submit(function () {
        window.thisPage.isDirty = false;
    });

    window.onbeforeunload = window.thisPage.closeEditorWarning;

Can anyone check what did I miss?

Also is it possible to customise the popup with my own styling?

rory-h
  • 660
  • 1
  • 12
  • 30
  • Incidentally, no it also is not possible to style the dialog, for the same security reasons it is also no longer possible to change the text. – Alexander O'Mara Jul 11 '17 at 05:52
  • I don't think so you can do that.. See this - https://stackoverflow.com/questions/38879742/is-it-possible-to-display-a-custom-message-in-the-beforeunload-popup. – RahulB Jul 11 '17 at 06:04

0 Answers0