Show error message in popup using SharePoint function

16/01/2018 10:25

We wanted to show some message in popup window of SharePoint style from javascript, something nicer than javascript alert. This function is core SharePoint function, so we don't need to create our custom using SP.UI.ModalDialog... it's very userful for showing alerts.


ShowErrorDialogCore('heading', 'message, can be html', function() {


   //do your stuff



In case we don't want any callback, just call


ShowErrorDialogCore('heading', 'message', null);