Sharepoint - Why does having `windows.onload` break page editing?
SharePoint also provides the _spBodyOnLoadFunctionNames function, which allows you to specify what script to run on page load. If you specify your function there, it is less likely to interfere with SharePoint's own script.
The reason is that you are hijacking the onload event from the SharePoint javascript.
See this post for help:
Stop The Window.Onload Madness.
Could you not just use jQuery
and the document.ready()
function?