Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free.

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

share|improve this question

2 Answers 2

up vote 0 down vote accepted

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/

share|improve this answer
    
Thanks for your help I will try this –  Rushikesh Mar 16 '12 at 7:57

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.