Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. IE ajax problem [modified]

IE ajax problem [modified]

Scheduled Pinned Locked Moved Web Development
helpcsharpxmltutorialquestion
7 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    snoopybb
    wrote on last edited by
    #1

    Anyone have any ideas why I get a "The data necessary to complete this operation is not yet available." error in IE? Edit: I'm pretty sure it has something to do with the file not being text.function http (m, u, d, f) { var r = null; if (window.XMLHttpRequest) { r = new XMLHttpRequest(); if (r.overrideMimeType) { r.overrideMimeType('text/xml'); } } else if (window.ActiveXObject) { try { r = new ActiveXObject('Msxml2.XMLHTTP'); } catch(e) { try { r = new ActiveXObject('Microsoft.XMLHTTP'); } catch(e){} } } if (r) { r.onreadystatechange = function() { if (r.readyState == 4) { alert(r.readyState); //This is 4 when the error occures if (r.status == 200) { **f(r.responseText);** //ERROR here "The data necessary to complete this operation is not yet available." } } }; r.open(m, u, true); r.setRequestHeader('Connection', 'close'); if (d) r.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); r.send(d); } } var df=document.getElementsByTagName("PARAM")[0].value; http('GET','http://example.net/'+df,'', function(data){alert(data);});
    -- modified at 18:54 Friday 27th April, 2007

    C S 2 Replies Last reply
    0
    • S snoopybb

      Anyone have any ideas why I get a "The data necessary to complete this operation is not yet available." error in IE? Edit: I'm pretty sure it has something to do with the file not being text.function http (m, u, d, f) { var r = null; if (window.XMLHttpRequest) { r = new XMLHttpRequest(); if (r.overrideMimeType) { r.overrideMimeType('text/xml'); } } else if (window.ActiveXObject) { try { r = new ActiveXObject('Msxml2.XMLHTTP'); } catch(e) { try { r = new ActiveXObject('Microsoft.XMLHTTP'); } catch(e){} } } if (r) { r.onreadystatechange = function() { if (r.readyState == 4) { alert(r.readyState); //This is 4 when the error occures if (r.status == 200) { **f(r.responseText);** //ERROR here "The data necessary to complete this operation is not yet available." } } }; r.open(m, u, true); r.setRequestHeader('Connection', 'close'); if (d) r.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); r.send(d); } } var df=document.getElementsByTagName("PARAM")[0].value; http('GET','http://example.net/'+df,'', function(data){alert(data);});
      -- modified at 18:54 Friday 27th April, 2007

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      yes, you use a different property to responseText, to get access to the document root node of the XML that you're being returned. var xml = req.responseXML.documentElement; This gives you the root node, in an XML DOM document.

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      S 1 Reply Last reply
      0
      • C Christian Graus

        yes, you use a different property to responseText, to get access to the document root node of the XML that you're being returned. var xml = req.responseXML.documentElement; This gives you the root node, in an XML DOM document.

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        S Offline
        S Offline
        snoopybb
        wrote on last edited by
        #3

        Thanks for the reply but by not text I meant some text mixed with a few nulls and some group separators followed by a block of a few hundred capital letters (what I was trying to extract). Anyway ,it works in firefox and I guess thats good enough for me. Now why does everything I write not work in IE.

        C 1 Reply Last reply
        0
        • S snoopybb

          Thanks for the reply but by not text I meant some text mixed with a few nulls and some group separators followed by a block of a few hundred capital letters (what I was trying to extract). Anyway ,it works in firefox and I guess thats good enough for me. Now why does everything I write not work in IE.

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Funny, nothing I write works in FF :P

          Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

          B 1 Reply Last reply
          0
          • C Christian Graus

            Funny, nothing I write works in FF :P

            Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

            B Offline
            B Offline
            Bradml
            wrote on last edited by
            #5

            So then we can agree that a conclusion of "Nothin Works" is pretty easy to draw...


            Brad Australian - URGENT URGENT PLZ READ B4 OTHERS VERY URGENT NO TIME WASTERS on "URGENT URGENT PLZ READ B4 OTHERS VERY URGENT NO TIME WASTERS " 1) do not use lower characters. They are just too small 2) do not give any error message, the expert will know what the problem is 3) do not come back to read the answer 4) do not say thanks 5) urge the readers as much as possible. Do not hesitate to write urgent as often as possible 6) do not explain what you are trying to achieve, the query is self-explaining 7) do not post create table statements, it is unnecessary to understand the problem 8) affirm that you know everything very well 9) never never never read the doc, it will waste your time 10) confirm to those who do not know it yet that MS Access is far better than Oracle

            1 Reply Last reply
            0
            • S snoopybb

              Anyone have any ideas why I get a "The data necessary to complete this operation is not yet available." error in IE? Edit: I'm pretty sure it has something to do with the file not being text.function http (m, u, d, f) { var r = null; if (window.XMLHttpRequest) { r = new XMLHttpRequest(); if (r.overrideMimeType) { r.overrideMimeType('text/xml'); } } else if (window.ActiveXObject) { try { r = new ActiveXObject('Msxml2.XMLHTTP'); } catch(e) { try { r = new ActiveXObject('Microsoft.XMLHTTP'); } catch(e){} } } if (r) { r.onreadystatechange = function() { if (r.readyState == 4) { alert(r.readyState); //This is 4 when the error occures if (r.status == 200) { **f(r.responseText);** //ERROR here "The data necessary to complete this operation is not yet available." } } }; r.open(m, u, true); r.setRequestHeader('Connection', 'close'); if (d) r.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); r.send(d); } } var df=document.getElementsByTagName("PARAM")[0].value; http('GET','http://example.net/'+df,'', function(data){alert(data);});
              -- modified at 18:54 Friday 27th April, 2007

              S Offline
              S Offline
              Shog9 0
              wrote on last edited by
              #6

              Sounds suspiciously like a problem with your response headers. Hopefully you have some control over the server sending this response; either way, i'd break out a good HTTP reference and start looking for inconsistencies...

              ----

              It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.

              --Raymond Chen on MSDN

              L 1 Reply Last reply
              0
              • S Shog9 0

                Sounds suspiciously like a problem with your response headers. Hopefully you have some control over the server sending this response; either way, i'd break out a good HTTP reference and start looking for inconsistencies...

                ----

                It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.

                --Raymond Chen on MSDN

                L Offline
                L Offline
                l a u r e n
                wrote on last edited by
                #7

                yah i was going to say it sounds very much like something is going wrong with the headers such that the httprequest object thinks it has complete data but doesn't really ... could also be the null values causing a mismatch between what the request is saying it has sent and the data length the client thinks it got

                "there is no spoon" {me}

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups