javascript - Why is SP.js not loading? -


i have researched pretty thoroughly , says code have below should load sp.js, cannot load.

debugging get:

newform.aspx, line 1667 character 5 script5009: 'peoplepicker' undefined  

and not see sp.js under view sources.

<sharepoint:scriptlink name="sp.js" runat="server" ondemand="true"      localizable="false" />  <script type="text/javascript">  executeordelayuntilscriptloaded(setwebuserdata(), "sp.js");  function setwebuserdata() {     var pplpicker = new peoplepicker();     // set parent tag id of people picker.     pplpicker.setparenttagid('main_x0020_contact');     pplpicker.setloggedinuser();     }; </script> 

any assistance appreciated.

you using executeordelayuntilscriptloaded wrong. should pass function name, should this:

executeordelayuntilscriptloaded(setwebuserdata, "sp.js"); 

without ()


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -