replaceWith not working with clones in IE7

replaceWith not working with clones in IE7


Hi
I'm fairly new to jQuery, so I'm trying some things out. I'm currently
writing something to copy a form (including all its values, but not
its event handlers) and place it into an existing iframe. The code I'm
using to do this is:
$("#theframe").contents().find("form").replaceWith($
("#upload_form").clone());
This works in Firefox and Safari, but doesn't work in IE7. Instead I
get an error saying: Invalid Argument. I would just use .html() to get
the form (which works) but this doesn't include the values, which I
need, specifically of a file input field.
Does anyone know if this is a bug? Or is there a workaround?
Any help much appreciated!