I have an HTML form and iframe like this:
<form id="frmUpload" target="ifrTarget" action='http://....asmx/SampleMethod'>
<input name="title" /><br />
...
<input type="submit"/>
</form>
<iframe id="ifrTarget" name="ifrTarget"></iframe>
Action attribute points to my ASP.NET web service. When the form is submitted, the IFRAME gets filled with the resulting XML. I need to retrieve DOM of this XML document. So far my code looks like this:
var iframe = document.getElementById("ifrTarget");
var root = iframe.contentWindow.document.documentElement;
This works perfectly in FireFox, Chrome and Opera browsers. But it doesn't work in IE 6 & 7. As far as I understand, in IE I get DOM of the HTML document which IE builds internally to display syntax highlighting for XML. What I need is to get underlying XML unmodified. Is it achievable in IE?
There is a strong reason to stick with form and iframe rather than call web service via AJAX. Unfortunately, AJAX is not an option for me in this particular case.