1

what is the way to use only one centralised javascript file in sharepoint 2007 and how we can refer to that js file through .aspx pages or custom master pages in sharepoint designer

Thanks

2 Answers 2

1

You can place it in the 12 hive in the layouts/1033 folder and then place a relative server reference in your page or masterpage. Here's a good thread on this: http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/a33634c7-19f7-401e-ae58-84bfe66a529e/

Sign up to request clarification or add additional context in comments.

Comments

0

You could also create a document library in your site collection in the root web site and refer to it that way too. If you do it this way, you can have versioning and it might be easier to update. Plus you can put security around the resource just like any other document. Some people like to put javascript files in their masterpage gallery as well. I think if you create a publishing site, it has a styles document library you can use for this purpose.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.