I have this variable template="<div>...</div>"
I want show this html code inside a dialog:
<div id="dialog" title="Basic dialog">
<p id="templates"></p>
</div>
<script>
$("#templates").html(template);
$( "#dialog" ).dialog({
height: auto,
width: 800,
modal: true,
// ...
});
</script>
But it doesn't work.
How I can append my custom html inside a dialog?
"<html><head>...</head></html>"into<p>. Are you serious? You can use<iframe>for this. Or maybe more simplified (just<body>inner HTML) template and<div>instead of<p>.