Posts

Showing posts from April, 2014

MOSS 2010: Run JavaScript OnSharePointReady

I was working a MOSS 2010 and a Business Connectivity Services (BCS) external list.  One of the columns was meant to be a link rather than just displayed as a string. So, I wanted to write a script to modify the Urls and change them to links via JQuery that I could add to the page via a Content Editor Web Part. The tricky part is that SharePoint dynamically loads the BCS external list, so you have to wait until SharePoint is done loading the list and generates the list on the page before making modifications to the DOM. After some searching, I found a link which referenced using the REST model. http://zimmergren.net/technical/sharepoint-2013-business-connectivity-services-talking-to-your-external-lists-using-rest http://msdn.microsoft.com/en-us/library/fp142380(v=office.15).aspx To add a function to run when the DOM is fully loaded: _spBodyOnLoadFunctionNames.push("YourOnLoadFunctionName");   Then in the function, you run the following to tell the code to