In most cases SharePoint pages are based on a master page that contains the "body" element. These content pages can’t directly add a function to the body’s onload event. In order to work around this limitation, SharePoint provides the "_spBodyOnLoadFunctionNames" array. When the body is loaded, the onload event handler executes each function whose name is contained in this array.
'<'script language="javascript"'>'
_spBodyOnLoadFunctionNames.push("FunctionName");
function FunctionName()
{
// Code
}
'<'/script'>'
All things SharePoint! This blog specializes in Microsoft SharePoint technologies, including web parts, development, configuration, customization, and best practices
What is SharePoint?
This is that :-) SharePoint in plain English
Labels:
Infrastructure,
Tip,
Welcome
Subscribe to:
Posts (Atom)