Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2019-06-17 02:52 PM
I have the following code listed in a CO on each of several layouts for one of our applications. The code functions as expected on all layouts except the default. On the default layout, it causes the Content Lookup Dialog related to the referenced element (Cross Reference Field) to be sized incorrectly. It extends the CLD off the bottom of the screen by twice again the screen height.
Sys.Application.add_load(function() {
var fieldX = document.getElementById("master_DefaultContent_rts_ts9455_s9460_f23726c");
var config = {attributes: true, childList: true, subtree: true };
var observer = new MutationObserver(functY);
observer.observe(fieldX, config);
});
I've isolated it to the last line of the function "observer.observe(flieldX, config);". Until this line is added, the problem does not occur. Any ideas what would be causing this and what I might do to correct it? I'm on 6.6P1.
2019-06-17 03:31 PM
Found my answer. I had the incorrect element ID selected for this particular layout. I replaced the code as follows to prevent this from occuring again:
Sys.Application.add_load(function() {
var fieldX = $('[id$="f23726c"]');
var config = {attributes: true, childList: true, subtree: true };
var observer = new MutationObserver(functY);
observer.observe(fieldX[0], config);
});