Is there a way to replace the ENTIRE contents of an iframe using Javascript (or Jquery)?
For example if my iframe had the following content...
blah o
I solved with this code:
$('#IframeID').contents().find("html").html(html);
Although this way you can work better in many of the cases, there will be more order:
$('#IframeID').contents().find("head").html(head);
$('#IframeID').contents().find("body").html(body);
So, you can play with head and body separately, and a bad change on body will not affect your head.
I tested on Chrome.