How to show a pop up if there is a change in freetextbox asp.net editor using jquery?

173 views Asked by At

Trying to show a pop up using jQuery on a submit/post action.

Using freetextbox and not planning to change it.

In my aspx page, the following script is added to find if a change in content.

function checkForContentChanges(action) {
        debugger;
        var consentTextBox = "";
        if (FTB_API != undefined && FTB_API != null) {
            objFTBControl = FTB_API['ConsentFreeTextBox'];
            if (objFTBControl) {
                var consentTextBox = objFTBControl.GetHtml;
            }
        }else {
            consentTextBox = $('#ConsentFreeTextBox').html();
        }

        ////var consentTextBox = $('#ConsentFreeTextBox').html();
        var consentContent = $('#hdnConsentContent').val();
        if (consentTextBox != consentContent) {
            ShowErrorPopup(action);
        }
        else {
            return true;
        }
    } 

I have a hidden variable that stores the content on page load named "hdnConsentContent" for content comparison on post action

Its not working and showing my pop up.

Thanks in advance for help.

0

There are 0 answers