The issue is that I’ve written a simple piece of JS that allows for some functionality that must be present on all pages. I’ve tried including it in /_catalogs/masterpage/default.master and I have found that it is not being called for the search results page.
The basic requirement as three core requirements:
- The include must only happen in one place within SharePoint – we cannot track and maintain multiple touch-points in the SharePoint code.
- The target file to be modified should exist for both 2007 and 2010 – I need to be able to provide instructions on where to include my code for users on both platforms.
- The code can’t go in core.js or any other file that can’t be modified by users on the hosted platform.
I’ve tried a number of different resources to figure this out, but I’m not a SharePoint guy, and trying to wrap my head around this architecture is quite daunting.
Try your options from here. On same blog, it is mentioned what was the best approach for SharePoint 2007 as well.
http://weblogs.asp.net/jan/archive/2010/03/01/scriptsrc-referencing-javascript-files-with-sharepoint-2010-custom-actions.aspx