jeudi 18 décembre 2014

SP.js file not loaded in a simple JSOM example



I am creating a simple example that demonstrates client object model using javascript. I have ceated a simple JS file in Visual Studio and an aspx page using the SharePoint Designer.


I have used the following command in my aspx page to include the sp.js and sp.runtime.js files but no success and so I get an error which says "ReferenceError: Type is not defined" when I run the page. the command that is used to include the sp.js is:



<script type="text/javascript" src="/_layouts/sp.js"></script>


and the code in my js file which I created using Visual Studio is:



jQuery(document).ready(function ()
{
retrieveListItems();

});


I am not able to figure out what is issue. Comment ASAP.








0 commentaires:

Enregistrer un commentaire