Ahoy!
Right I have some javascript that is used in pages and in controls that are going to be used in just one site. Before, the javascript was just in the actual page, but as I have added a page that doesn't use the masterpage (but still needs the javascript), I thought I would add the javascript into a js file and just get everything to link to that. Big mistake.
Now, the standalone page finds the javascript ok, but custom controls in pages which use the masterpage dont. As the pages are in subfolders, I assumed it might be something to do with relative paths. I've tried link / run=server / src=~/script/javascriptfile.js, I've tried moving the file into the root and hardcoding the path but nothing works!
Does anyone have any idea? I hate having code repeated all over the shop!
Cheers.
Right I have some javascript that is used in pages and in controls that are going to be used in just one site. Before, the javascript was just in the actual page, but as I have added a page that doesn't use the masterpage (but still needs the javascript), I thought I would add the javascript into a js file and just get everything to link to that. Big mistake.
Now, the standalone page finds the javascript ok, but custom controls in pages which use the masterpage dont. As the pages are in subfolders, I assumed it might be something to do with relative paths. I've tried link / run=server / src=~/script/javascriptfile.js, I've tried moving the file into the root and hardcoding the path but nothing works!
Does anyone have any idea? I hate having code repeated all over the shop!
Cheers.