Friday, July 1, 2011

Set height of page to full screen from JavaScript

Call any of the following JS method onload of body like to set the height of page to full screen.

function resizehtml() {
            window.moveTo(0, 0);
            window.resizeTo(screen.availWidth, screen.availHeight);
        }


function setPanelHeight() {
           
            var hederHeight = document.getElementById('header').offsetHeight;
            var footerHeight = document.getElementById('footer').offsetHeight;
            var contentHeight = document.getElementById('content').offsetHeight;
            height = document.body.clientHeight - hederHeight - footerHeight;
            document.getElementById('content').style.height = height;
            }





Populate people picker field with logged in user in SharePoint using JS

Please use below code to populate people picker in SharePoint online, <script src="https://ajax.googleapis.com/ajax/libs/jquery/3....