0 Replies Latest reply on Sep 21, 2012 7:55 AM by sodhouse

    AJAX-loaded DOM element blowing up editorial interface


      We are building a responsive site and are conditionally loading a big chunk of content via AJAX only for clients with sufficient screen real estate. I created a page with two renditions where one loads the page and the other loads just the conditional content. Both have editorial elements. When I load the page in the authoring environment, the AJAX content loads and I can edit text, but when I click OK on the dialog, the page disappears and all I see is the one element that I've modified. In Chrome's DOM inspector it looks like an extra <head> and <body> have been inserted in the document. What might I be doing wrong? Are there any examples of AJAX or DOM manipulated pages for CQ that I can look at?


      EDIT: My current suspicion is that because the fragment is a cq:Page, it's inserting <body> and <head> tags automatically. Is there some way I can change that?