1

For the SP2013 I used the following javascript to show messages:

var msId = SP.UI.Status.addStatus('Message:', 'A message');
SP.UI.Status.setStatusPriColor(msId, 'red');

I migrated (and upgraded to 2016) the farm on a test server where the posted code does not work. msId is always null. This due to the following code in init.js:

function addStatus(g, h, e, f) {
    var a = document.getElementById("pageStatusBar");
    if (a != null ) {
        a.setAttribute("aria-live", "polite");
        a.setAttribute("aria-relevant", "all");
        var b = _createStatusMarkup(g, h, true, f);
        if (!e)
            a.appendChild(b);
        else {
            var c = a.getElementsByTagName("SPAN")
              , d = c.length > 0 ? c[0] : null ;
            if (d != null )
                a.insertBefore(b, d);
            else
                a.appendChild(b)
        }
        if (a.childNodes.length == 1) {
            StatusIdWithTopPriority = b.id;
            StatusColorWithTopPriority = 1
        }
        a.style.display = "block";
        return b.id
    }
    return null
}

This means that the element pageStatusBar does not exist...

Comparing oslo.html and seattle.html I found the difference, one has it the other does not. The point is that the two files of the old 2013 and the new 2016 match, so how it is possible that the end UI is different?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.