Currently I'm porting an existing SharePoint 2010 solution to SharePoint 2013. Currently I'm struggling with a small javascript issue. The javascript is a small routine which disables some managed metadata fields to prevent users to change those fields within a custom page opened in a dialog. Currently we run a method at page load which initializes this by using the method ExcuteOrDelayUntilScriptLoaded(InitFieldsMethod, "ScriptForWebTaggingUI.js"); In SP2010 this part of code was working. What it actually does is that it executes our initialization method after the rendering and initialization of the metadata controls was done (this was done in SP2010 by ScriptForWebTaggingUI.js). In SP2013 it seems that this method doesn't work anymore.
When I use this code the initialization method gets called to early, because the rendering of the metadata fields hasn't done yet. What I've tried is to place the ExcuteOrDelay routine later in the page or bind it to other js files like sp.js. But all of these variants didn't work properly. Does somebody know what I can do to force that the initialization code runs after the metadata fields have rendered properly? The code itself still works, which I've verified by using the developer toolbar in IE 8 and then call the initialization from console manually after proper loading of the page.