I have a master page that will be wrapped around custom .NET coding, and does not need ribbon or web part dependencies.

Is there a clean and easy way from the .html master page in sharepoint 2013 to either customize or remove the init.js process so that .NET developers can go to town? scrolltop code in sharepoint's init.js file, is colliding with our custom form application processes.

this code within init.js is out of control...

if (!g_setScrollPos) {
        if (browseris.firefox && browseris.firefox36up)
            window.scrollTo(0, 0);
        if (Boolean((ajaxNavigate.get_search()).match(RegExp("[?&]IsDlg=1")))) {
            if (!isIE7 || elmWorkspace.scrollHeight < elmWorkspace.clientHeight)
                elmWorkspace.style.overflowY = "auto";
        var scrollElem = document.getElementById("_maintainWorkspaceScrollPosition");

        if (scrollElem != null && scrollElem.value != null) {
            elmWorkspace.scrollTop = Number(scrollElem.value);
        g_setScrollPos = true;
    g_frl = false;

...when you attempt to apply a postback action on a link. no matter what you do, on setting the postback parameters, on submit, the page does not go back to the top of the window, but stays at the same position.

If this code was explicitly for the ribbon, then why not set ribbon only parameters around it?


You could create your own JavaScript file and have it overload the methods you need to modify. Make sure your JavaScript file is loaded after init.js


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.