Embedding JavaScript in SharePoint Pages

The best method to embed custom javascript in SharePoint pages is to create a .js file and then include it in the SharePoint Page. If you would like to include javascript functions in the onload event of a sharepoint page, use the _spBodyOnLoadFunctionNames array. Include the push method in your script with the title of your function. The function should not include parameters... <script> function runOnLoad(){ } _spBodyOnLoadFunctionNames.push Read More... Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks

Read the complete post at http://www.sharepointblogs.com/chadclarkesmossblog/archive/2007/08/20/embedding-javascript-in-sharepoint-pages.aspx

Published Monday, August 20, 2007 7:02 PM by SharePoint Blogs