Skip to main content
Updated based on user feedback
Source Link
Nadeem Yousuf-AIS
  • 18.7k
  • 4
  • 29
  • 59

You need to append 15 to _layouts i.e /_layouts/15 in order to get hold of the file as you are working on SP 2013.

UPDATE

Put the javascript file under CustomRibbonButton folder in your project and use /_layouts/15/CustomRibbonButton/JavaScript1.js. The hive folder for SharePoint 2013 is 15. It used to be 12 for MOSS and 14 for SP 2010. This needs to be used explicitly as SP 2013 also supports solutions which are 2010 based and if you don't mention 15 in your code, then it will look for the file in 14 hive.

You need to append 15 to _layouts i.e /_layouts/15 in order to get hold of the file as you are working on SP 2013

You need to append 15 to _layouts i.e /_layouts/15 in order to get hold of the file as you are working on SP 2013.

UPDATE

Put the javascript file under CustomRibbonButton folder in your project and use /_layouts/15/CustomRibbonButton/JavaScript1.js. The hive folder for SharePoint 2013 is 15. It used to be 12 for MOSS and 14 for SP 2010. This needs to be used explicitly as SP 2013 also supports solutions which are 2010 based and if you don't mention 15 in your code, then it will look for the file in 14 hive.

Source Link
Nadeem Yousuf-AIS
  • 18.7k
  • 4
  • 29
  • 59

You need to append 15 to _layouts i.e /_layouts/15 in order to get hold of the file as you are working on SP 2013