Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Notification Banner in SharePoint Online

$
0
0

Hi,

I am trying to add a compliance warning banner on both the page and the upload dialogue box on SharePoint Online and I can online seem to display them in one or the other!

This is what I am using

window.onload = function(){
    var bodytag = document.getElementsByTagName('body')[0];
    var div = document.createElement('div');
    div.setAttribute('id','banner');
    div.innerHTML = '<p style="background-color:yellow"><strong>Security Notice: Export Compliance -</strong></p>';

    bodytag.insertBefore(div,bodytag.firstChild); // Adds the Banner just after the opening <body> tag
    document.getElementsByTagName('body')[0].className+=' banner'; //Adds a class to the <body> tag when the banner is visible


}

Is there a better way to do this to ensure it displays everywhere and on the upload dialogue?

Any pointers would be great thanks in advance.


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>