Monday 16 June 2014

Type.registerNamespace("SP") error


Solution:
You might have missing : https://ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js"></script>
or you might have missing jquery reference
<script src="jquery-1.9.1.js" type="text/javascript"></script>
And Make sure you are adding all references in the below order.
<script src="jquery-1.9.1.js" type="text/javascript"></script>
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js"></script>
<script src="_layouts/15/sp.runtime.js" type="text/javascript"></script>
<script src="_layouts/15/sp.js" type="text/javascript"></script>