简体   繁体   中英

hide div content in Dynamics CRM

Following is the code I have done so far to hide a div content. But unfortunately it is not working on CRM online.

 function hideSocialEmailErrorMsgBlock() {
       debugger;
       var _errorMsgBlock = document.getElementById("emailnotification");
       var _warningMessage = document.getElementById("warningmessage");
       if ((errorMsgBlock == null && errorMsgBlock == undefined) || (warningMessage == null && warningMessage != undefined)) 
       {
        setTimeout(hideSocialEmailErrorMsgBlock, 1000);
        return;
       }
       else
       {
        document.getElementById("emailnotification").innerHTML = '';
        document.getElementById("warningmessage").innerHTML = '';
        // code has to be placed here...
        // $("#warningmessage").hide();
        // $("warningmessage").attributes("style.display","none");
        // $("emailnotification").attributes("style.display","none");
        //$("#emailnotification").hide();
        setTimeout(hideSocialEmailErrorMsgBlock, 1000);
       }
    }

It is the image of front end.

在此处输入图片说明

Here is the image of web page.

在此处输入图片说明

I have to hide error showing on web page.

If you want to completely hide your emailnotification div with Javascript , you can just use:

document.getElementById('emailnotification').style.display = 'none';

This would be a simpler alternative than trying to hide all of the text.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM