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 outside of html
<html>
<head>
</head>
<body>
<h1> my title </h1>
</body>
</html>
blah outside of html
..It could all be replaced by your script :)
The best that I've seen so far is this:
$(youriframe).contents().find('html').html('your content here');
but that still wouldn't replace the content outside of the html tags. We have an interesting scenario where we must assure that ALL the content is replaced.
OR a new iframe with fresh content is created and simply replaces the previous iframe.
Please no comments about the src attribute.