August 25, 2010
loading html page inside div
Question by coder247
how can I load an html page inside a div. With the ‘object’ tag it’s loading, but I think it’s not a good approach. It is not an external file. Is dojo good for this?
Answer by coder247
This also works… using dojo…
<script type="text/javascript">
var url = dojo.moduleUrl("dijit.form", "help.html");
dojo.xhrGet({
url: url,
load: function(html){
dojo.byId("mycontent").innerHTML = html;
}
});
</script>
<div id="mycontent">
</div>