при попытке создать диалоговое окно с iframe получаю сообщение об ошибке [code]$("#dialogFrame").dialog({ autoOpen: false, // Dialog is not shown on page load modal: true, // Make the dialog modal buttons: { "Close": function() { $(this).dialog("close"); } } });
$(document).on('click', ".opendialog1", function(e) { e.preventDefault(); var dialogHref = $(this).data('dialog-href'); var cssFile = $(this).data('css'); var dialogTitle = $(this).data('dialog-title') || 'View Details'; var dialogWidth = $(this).data('dialog-width') || 600; var dialogHeight = $(this).data('dialog-height') || 600;
// Set the dialog content $("#dialogFrame").html('');
// Open the dialog $("#dialogFrame").dialog("open");
// Handle the iframe's load event $("#myIframe").on("load", function() { if (cssFile) { var iframeDoc = this.contentDocument || this.contentWindow.document; var link = iframeDoc.createElement("link"); link.rel = "stylesheet"; link.href = cssFile; iframeDoc.head.appendChild(link); } }); }); [/code] с этим кодом [code]Upload Gallery [/code] появляется ошибка [code]Uncaught TypeError: i.getClientRects is not a function [/code] что указывает на это: [b]$("#dialogFrame").dialog("option", "width",dialogWidth);[/b]< /п>