Friday, October 08, 2010

How to Add onLoad JavaScript event in SharePoint?

If you a have some javascript code that needs to be executed on the onLoad event of a page in SharePoint.

SharePoint provides a JavaScript array "_spBodyOnLoadFunctionNames", any function to be executed onLoad needs to be added to this array e.g.