Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Content Lookup Dialog Resized on Default Layout

NathanDeGarmo
Contributor III

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.

1 REPLY 1

NathanDeGarmo
Contributor III

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);
});