Tuesday 27 February 2018

On Date picker, page jumping to the top

function OnIframeLoadFinish() {
ULSvmd:
    ;
    var picker;    
    if (typeof this.Picker != 'undefined')
        picker = this.Picker;
    if (picker != null && typeof picker.readyState != 'undefined' && picker.readyState != null && picker.readyState == "complete") {
        document.body.scrollLeft = g_scrollLeft;
        document.body.scrollTop = g_scrollTop;
        g_scrollTop = document.getElementById('s4-workspace').scrollTop;
        picker.style.display = "block";
        if (typeof document.frames != 'undefined' && Boolean(document.frames)) {  /* "document.frames" doesn't work on chrome use "window.frames" instead*/
            var frame = document.frames[picker.id];    
            if (frame != null && typeof frame.focus == 'function')
                frame.focus();
        }
        else {
            picker.focus();
        }
    }
    setTimeout(function(){
        document.getElementById('s4-workspace').scrollTop = g_scrollTop;
    }, 1);
}

No comments:

Post a Comment

Featured post

Data connections in Infopath forms

https://www.qdoscc.com/blog/how-automatically-retrieve-current-username-infopath-sharepoint-list-form

Popular Posts