I have this code:
<script type="text/javascript">
$(document).ready(function() {
$("#iframeId").contents().find("body").append($("#test"));
});
</script>
<iframe id="iframeId" name="iframeId" src="about:blank" ></iframe>
<div id="test">
Text
</div>
And i need to append whole object to iframe (not only the html()). It works well in IE, Firefox and Opera, but I can't make it going in Chrome/Safari. Is there any hack or other way, how to put html object into the iframe, working with WebKit?
EDIT
I can't clone the object (or use its inner Html), because I need to use it with file input and I can't copy it due to security restrictions.