2
Answers

How to reference SP.js in Content Editor Webpart using sp10

venkat naresh

venkat naresh

8y
331
1
Hi iam trying to execute some javascript code to retrieve a list items using a content editor webpart in sharepoint 2010 but it was not showing any stuff on the page..Hope SP.js is not referencing properly, can any one share how to reference it correctly to view the list items..
 
 
 
Thanks in  Advance.
Answers (2)
1
Prasham Sabadra

Prasham Sabadra

NA 17.6k 1.2m 8y
Hi Venkat,
Please try this
<script src=”/_layouts/SP.js” type=”text/ecmascript”></script> 
Accepted
1
Ramesh Palaniappan

Ramesh Palaniappan

NA 13.2k 722.6k 8y
Please add this line to call your function
  1. ExecuteOrDelayUntilScriptLoaded(myjsfucntion,"sp.js");