Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8869705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:32:45+00:00 2026-06-14T17:32:45+00:00

I am using ajax_upload for uploading files without a postback of the entire page.

  • 0

I am using ajax_upload for uploading files without a postback of the entire page.
The server is returning the response as XML that I then parse in my onComplete function, this works in Chrome, Safari and Firefox but not in Internet Explorer. The reason for this not working in Internet Explorer (at least what I think is the reason) is that IE parses the XML in the iframe and displays it with syntax highlighting and all even though the iframe is set to size 0.
When ajax_uploads then reads the iframe it gets a corrupted version of the XML that I am unable to parse with $.parseXml() because of the syntax highlighting that IE adds to it.

I have Googled and found mentions of using iframe.document.XMLDocument to get the raw XML from the iframe but it didn’t work for me and the posts mentioning it was realy old.

So the question is, does anybody know how to get the XML data from the iframe without the syntax highlighting done by IE (that it does by adding HTML and escaping the tags in my XML) or is there a way to tell IE not to parse the XML in a HTTP header or something like that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:32:47+00:00Added an answer on June 14, 2026 at 5:32 pm

    I thought Content-Type: text/plain could help in fixing this issue, but this only helps in other browsers. IE has its own way to detecting content type, and this behavior cannot be easily disabled. More information on this available at MSDN and more briefly here.

    Of course you could make a dirty hack like this:

    <iframe src="test.xml" onload="test()" id="f1"></iframe>
    

    And parse highlighted code:

    function test() {
        var iframe = document.getElementById('f1');
        var frameBody = iframe.contentWindow.document.body;
    
        // remove unneeded toggle links +/-
        var links = frameBody.getElementsByTagName('a');
        for (var i = links.length - 1; i >= 0; i--) {
            if(links[i].className === 'b') {
                links[i].parentNode.removeChild(links[i]);
            }
        }
    
        // display parsed XML source
        alert(frameBody.innerText);
    
        // parse cleaned highlight code source to new XML document
        var xml = $.parseXML(area.value);
        alert(xml);
    }
    

    This works in IE6-8, but this way is unreliable 🙂 So I suggest you using JSON instead of XML if possible to avoid this issues.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using AJAX to send form data to a server php file that
I need to upload multiple files into web server using MVC3 with RAZOR. I
I'm using four JQuery Uploadify browse buttons on a page that's calling the Uploadify
I am using uploadify for uploading the files with PHP 5.3.3 and Apache 2.2.16
I've been looking for a way to monitor file uploading information without using flash,
I'm using an Ajax code for uploading files. Django takes good care of file
Greetings, I'm uploading an image to my server using the following code: http://cocoadev.com/index.pl?HTTPFileUploadSample However,
I have a problem with file uploading. I'm using that very method described in
I'm using Jquery Ajax Form to upload files, which works well in Chrome and
EDIT: iam using ajax to load text in my content that is why onload

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.