AnsweredAssumed Answered

Is there anyway to block custom javascript from running in the Marketo LP editor?

Question asked by Justin Morris on Dec 21, 2017
Latest reply on Dec 22, 2017 by Justin Morris



We have a webinar landing page that allows for up to 5 presenters. Our developer wrote some custom code that behaves like this: If one of the image placeholders is removed from a presenter row, hide that row. This allows us to simply use the same template but with different numbers of presenters and add/remove them as needed. This was working fine until we upgraded to SSL. Now within the editor, when I remove one of the images, the javascript begins to load and the editor crashes. When I reload the page it just shows nothing in the presenter area. This was happening before when the javascript was coded directly in the footer. But I made it into a separate JS page and called to it in the footer and that solved the issue. But now it's seeming like SSL brought the issue back. Does anyone have any insights or advice on how this Javascript could still work? Or a way it could be disabled just in the Marketo editor. The code is below.


$(document).ready(function(){      $(".profile-wrapper").each(function(){     if ($(this).find('img').length) {   // there is an image in this div, do anything here..   } else   {   $(this).remove();   }   });   });