Interaction of executeOrDelayUntilScriptLoaded and <Script> html

433 Views Asked by At

The script that I am attaching to my SP2013 NewForm is as follows

<script src="https://.../lib/JQuery/jquery-1.10.2.min.js"></script>
<script src="https://.../Configuration/SiteAssets/jquery.SPServices-2014.02.min.js"></script>
<script>
   function NullFn() {console.log('Fn Load')}
   function NullFn1() {console.log('Fn1 Load')}
   function NullFn2() {console.log('Fn2 Load')}
   function NullFn3() {console.log('Fn3 Load');}
   
   SP.SOD.executeOrDelayUntilScriptLoaded(NullFn,'sp.js');
   SP.SOD.executeOrDelayUntilScriptLoaded(NullFn1,'jquery.SPServices-2014.02.min.js');      
   SP.SOD.executeFunc('sp.js', 'SP.ClientContext', NullFn2);
   SP.SOD.executeOrDelayUntilScriptLoaded(NullFn3, 'SP.UserProfiles.js');   
</script>

In the console LOG, I am getting trace for Fn Load and Fn2 Load

Fn1 and Fn3 seem to be in wait mode, even though SPServices is showing as having loaded in the Network Tab (200, OK).

What is blocking Fn1 from executing?

1

There are 1 best solutions below

0
On

Found the problem, there was a behind the scenes script that was reloading jQuery based on a onpageload type event, that caused the break with SPServices.