I am trying to load a frame-set in a dial开发者_Go百科og:
$("#dialog").load ("myFrame.html).dialog ({title:"Edit Info"}).dialog('open');
the dialog opens but empty, the frame is not loading. No error in firebug either. If I try to open a simple page then it's loading OK (minus the css though).
Is there an inherit limitation of opening a frameset in a dialog?
I'm using jQuery 1.4.4 and jQueryUI 1.8.6
Thanks
Mike
Is there an inherit limitation of opening a frameset in a dialog?
Yes, there is, as explained in the jQuery docs:
jQuery uses the browser's
.innerHTML
property to parse the retrieved document and insert it into the current document. During this process, browsers often filter elements from the document such as<html>
,<title>
, or<head>
elements. As a result, the elements retrieved by.load()
may not be exactly the same as if the document were retrieved directly by the browser.
Browsers will discard many of the structural elements of a page and this includes framesets. The only way to display framesets inside another page is using an iframe
.
精彩评论