1

I came across a problem today when I trying to render content from an external source into a dijit.layout.ContentPane.

  HTML
  <div id="someId"></div>

  JS
  var cp = new dijit.layout.ContentPane({}, "someId");
  htmlFromExtSrc = "<frameset> <frame src="http://www.google.com"></frameset> 
                    Other Data ";
  cp.set("content", htmlFromExtSrc);

What gets set in the html is only OtherData. Frameset and frame do not showup in the html.

I aim need to show the content from an external site rendered into the Pane correctly. Using Iframe solves the problem but I am looking for a better solution. Is there a way to work around this problem?

Sheldon Fernandes
  • 1,299
  • 1
  • 11
  • 18
  • simply put, dont use frames.. its so yesterday imo – mschr Sep 14 '12 at 15:47
  • I agree with not using frames. But what i want to achieve really is to be able to render content from an external source correctly, whether frames or no frames is not in my control. – Sheldon Fernandes Sep 17 '12 at 06:24
  • Try dojox.layout.ContentPane. It parses script tags etc.. Thing is, at some point you will hit a `domnode.innerHTML = htmlFromExtSrc;` - and this is not at all the same as `iframe.contentDocument.write(htmlFromExtSrc);` – mschr Sep 17 '12 at 18:09

0 Answers0