Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Multiple SP.SOD.executeFunc() on same page

$
0
0

Hi all,

I'm relatively new to client side programming on SharePoint 2013.  

I have created a javascript file which interrogates a list which is used within a webpart (CEWP referring to the javascript file).  This all works fine.

The problem I'm having is when I try to add another webpart, which also makes use of javascript SP.SOD.executeFunc, to the same page.  Only the first webpart will work as expected.  It's as only one SP.SOD can work on a page?

I could rollup all the json code from the two webparts into the one, but I would ideally like these separate so they can be used elsewhere on the site either individually or together.

I've searched the net for answers to this but can only find others asking the same question, without answer.

Any help would be appreciated.


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>