Dot Net Mafia

Group site for developer blogs dealing with (usually) Ionic, .NET, SharePoint, Office 365, Mobile Development, and other Microsoft products, as well as some discussion of general programming related concepts.

This Blog



Corey Roth [MVP]

A SharePoint MVP bringing you the latest time saving tips for Ionic, SharePoint, and Office 365.

JavaScript runtime error: 'NotifyScriptLoadedAndExecuteWaitingJobs' is undefined

I recently ran into the following error when working with a SharePoint 2013 Client Web Part (App Part) while accessing the term store using SP.Taxonomy.js

JavaScript runtime error: 'NotifyScriptLoadedAndExecuteWaitingJobs' is undefined.


The following line gets hit in the debugger.


The code I had worked fine inside a page, but when placed inside a client web part, I received the error.  I thought it might be something to do with the order in how I loaded the script files.  I recently switched to the new Client Web Parts set up in the RTM version of the Office Developer Tools.  This particular update changes the references to the JavaScript files to the page instead of being loaded dynamically with $.GetScript().  It turns out it had nothing to do with that.  Instead, I just needed to add a reference to Init.js.  Here is what my complete list of references looks like in the page for my client web part.

<script type="text/javascript" src="../Scripts/jquery-1.7.1.min.js"></script>

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

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

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

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

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

If you receive the error above that is all you have to do..  Luckily, it’s easy to fix.



JavaScript runtime error: 'NotifyScriptLoadedAn... said:

Pingback from  JavaScript runtime error: 'NotifyScriptLoadedAn...

May 14, 2013 2:03 PM

Neal said:

Thank you so much! This post just saved my day!

September 5, 2013 6:40 AM

Fadi Nassri said:

Many Thanks Corey Roth

February 25, 2014 2:53 AM

Jijo Joy said:

Thanks a lot. I missed the init.js

June 16, 2014 12:05 PM

Monvi said:

it did'nt solve my issue..still getting the same error..

September 23, 2014 1:56 AM

How To Fix Java Runtime Error Is Undefined in Windows said:

Pingback from  How To Fix Java Runtime Error Is Undefined in Windows

January 9, 2015 5:20 AM

Leigh F said:

Thank you sooo much! great you identified the specific init.js file too... Saved me a lot of hours with this

May 22, 2015 9:12 AM

Leave a Comment


About CoreyRoth

Corey Roth is an independent SharePoint consultant specializing in ECM, Apps, and Search.
2018 dotnetmafia.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems