Is it possible to reuse the same javascript file across display templates in different site collections? For example, I have a search center site athttp://xyz.com/search and a root site at http://xyz.com. These sites have their own set of display templates located at /_catalogs/masterpage/display templates.
I have a javascript that I would like to reuse in display templates in both search site and root site. I am using the following code to include javascript file:
<body><script type="text/javascript">
RegisterSod("customtransform.js", _spPageContextInfo.webAbsoluteUrl + "/Style%20Library/People/SearchBox_Functions.js");
EnsureScriptFunc("customtransform.js", null, function () { });</script><div id="Control_SearchBox">Not sure how I can reuse the javascript file. Can someone provide pointers?
Thank you!