469,271 Members | 1,431 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

IE7 without responseXML?

I downloaded IE7 and tried out the native XMLHttpRequest support. I
think there is an object in IE7 called "XMLHttpRequest" but I ask me
why it is called "XML"HttpRequest.
I made a request to an XML file (correctly sent with text/xml header)
but IE7 returns the same shit as IE 5.5/6 when I use responseXML, an
XML construct with a node "xml", which contains nothing.

Firefox and Opera and Netscape 7.1 (yeah,) do it correctly. What's goin
on with Microsoft. Will they continue with IE tragedy?

http://dropie.com

Sep 22 '06 #1
14 5762
If I want every browser to support "XML"HttpRequest, what do I have to
do:

I have to test if my browser has native XMLHttpRequest (not in IE5.5/6
and possibly 7 (can be switched off)) or activated ActiveX (Ie5.5/6)
and I have to be sure not to use IE because IE up to 7 isn't XML ready.
So you have to find another solution to read XML. One is to make a
request via Iframe and PHP file that reads an XML file and sends it
back as text/html. Now you have to use xmljs
(http://xmljs.sourceforge.net) to parse an XML tree from the
responseText.

We have to wait some years until 99% of the browsers will be Ajax
ready. If we don't want to wait and don't want to find a fallback
solution, we should stop talking about XML;)

greetz

Andi, Ulm, Germany

Sep 22 '06 #2
Firefox and Opera and Netscape 7.1 (yeah,) do it correctly. What's goin
on with Microsoft. Will they continue with IE tragedy?
Why don't they just buy/use/steal Firefox? The people on intranets can
just continue with IE 6.

Peter

Sep 23 '06 #3
pe**********@gmail.com wrote:
>Firefox and Opera and Netscape 7.1 (yeah,) do it
correctly. What's goin on with Microsoft. Will
they continue with IE tragedy?

Why don't they just buy/use/steal Firefox? The people
on intranets can just continue with IE 6.
That is a long way from necessary as IE 7 does not have any problems
with responseXML. Programmer error is the most likely explanation for
comments here, and saying something doesn't work is a long way from
demonstrating that it doesn't.

Richard.
Sep 24 '06 #4

Richard Cornford wrote:
pe**********@gmail.com wrote:
Firefox and Opera and Netscape 7.1 (yeah,) do it
correctly. What's goin on with Microsoft. Will
they continue with IE tragedy?
Why don't they just buy/use/steal Firefox? The people
on intranets can just continue with IE 6.

That is a long way from necessary as IE 7 does not have any problems
with responseXML. Programmer error is the most likely explanation for
comments here, and saying something doesn't work is a long way from
demonstrating that it doesn't.

Richard.
I think IE7 HAS some problems, I installed both the standalone and the
normal version (that replaces IE6), and they behave like IE5 and 6,
responseText is available, responseXML is not available. I don't know
why but XML is not supported. Is it possible that there have been
problems with my installation?

Sep 26 '06 #5
See a demo: http://aka-fotos.de/research/uniajax/__index.php
It doesn't work in IE 7, but in Firefox, Opera and Netscape.

Sep 26 '06 #6
webEater said the following on 9/26/2006 4:44 PM:
See a demo: http://aka-fotos.de/research/uniajax/__index.php
It doesn't work in IE 7, but in Firefox, Opera and Netscape.
I see, close, to the same thing in IE and Firefox, what is that page
supposed to do?

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Sep 26 '06 #7

Randy Webb wrote:
webEater said the following on 9/26/2006 4:44 PM:
See a demo: http://aka-fotos.de/research/uniajax/__index.php
It doesn't work in IE 7, but in Firefox, Opera and Netscape.

I see, close, to the same thing in IE and Firefox, what is that page
supposed to do?

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Hi Randy,

this page is supposed to test XMLHttpRequest in all Browsers that
support it.
In IE 7 you don't see anything of the responseXML, you only see that
the firstChild.nodeName is "xml", but this node contains nothing.

I am working on an Ajax framework that will really work in every
browser. That's why I am testing all that shit. It's very hard to do ,)

Sep 26 '06 #8
Hi,

webEater wrote:
Hi Randy,

this page is supposed to test XMLHttpRequest in all Browsers that
support it.
In IE 7 you don't see anything of the responseXML, you only see that
the firstChild.nodeName is "xml", but this node contains nothing.

I am working on an Ajax framework that will really work in every
browser. That's why I am testing all that shit. It's very hard to do ,)
The following code works in IE7:

Client:

var oHttp = null;
if ( window.XMLHttpRequest )
{
oHttp = new window.XMLHttpRequest();
}
else
{
if ( window.ActiveXObject )
{
oHttp = new window.ActiveXObject( "Microsoft.XMLHTTP" );
}
else
{
throw "UNSUPPORTED PLATFORM";
}
}

[...]

oHttp.onreadystatechange = function()
{
var bDummy = false;
if ( oHttp.readyState == gslb.CAjaxPox.HTTP_READY_STATE )
{
var oResult = new gslb.CAjaxPox.CResult( oHttp );
oHttp = null;
fnCallback( oResult );
}
}
oHttp.send( null );

[with]

gslb.CAjaxPox.CResult = function( oHttp )
{
this.m_docXml = oHttp.responseXML;
this.m_strText = oHttp.responseText;

this.m_iStatus = oHttp.status;
this.m_strStatus = oHttp.statusText;
}

As you see, I am using responseXML, and it works in IE7. The server side
code looks like this (C#):

[Creating XML document, and then:]

context.Response.ContentType = "text/xml; charset=utf-8";
docResponse.Save( new XmlTextWriter( context.Response.OutputStream,
context.Request.ContentEncoding ) );

docResponse is, of course, the XmlDocument.

Note that you *must* set the content type correctly, or else it won't work.

Show your faulty code (client and server), the best idea being putting
the code on a web server somewhere for us to inspect.

Greetings,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Sep 27 '06 #9
webEater wrote:
Richard Cornford wrote:
<snip>
>That is a long way from necessary as IE 7 does not have any
problems with responseXML.
<snip>
>
I think IE7 HAS some problems, ...
<snip>

Your thinking IE 7 has a problem is not the same as it having a
problem. At the moment I am working on a web application that uses SOAP
base web services to such an extent that not having responseXML would
be completely obvious (as it would cripple the application). To date
all IE 7 testing has not revealed any problems associated with XML HTTP
requests.

Richard.

Sep 27 '06 #10
No problem, I see that your IE7 supports response XML, my example:

serverside, simple XML
(http://aka-fotos.de/research/uniajax/responseXml.php), with correct
Content-Type:

<?
header('Content-Type: text/xml');
echo '<?xml version="1.0" encoding="utf-8"?'.'>';
?><response>hello</response>
And my client side test script
(http://aka-fotos.de/research/uniajax/_index.php):

<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
....
<script type="text/javascript"
src="../prototype/js/prototype.js"></script>
<script type="text/javascript">
inspect = function(object) {
...
}
</script>
....
</head>
<body style="font-size:12px;font-family:Verdana;">

<script type="text/javascript">
onload = function() {
request = function() {
var ajax = new XMLHttpRequest();
$('res').innerHTML = 'Request Object: '+ajax+'<br><br>';
ajax.onreadystatechange = function() {
// print the results:
if (ajax.readyState == 4) {
$('res').innerHTML += 'responseText:
'+ajax.responseText.escapeHTML();
$('res').innerHTML += '<br><br>Inspected responseXML:
'+inspect(ajax.responseXML);
$('res').innerHTML += '<br><br>responseXML.firstChild.nodeName:
'+ajax.responseXML.firstChild.nodeName;
}
}
ajax.open('get', 'responseXml.php');
ajax.send(null);
}

request();
}
</script>

<!--INPUT: <input id="input" onkeyup="request(this.value);"
style="border-width:1px;border-color:silver;border-style:solid;"/><br>-->

&nbsp;

<div id="params"
style="font-size:12px;font-family:Verdana;border-width:1px;border-color:silver;border-style:solid;padding:10px;">INFORMATION
TO LAST REQUEST:<br>&nbsp;</div>

&nbsp;

<div id="res"
style="font-size:9px;font-family:Verdana;border-width:1px;border-color:silver;border-style:solid;padding:10px;">RESULT:<br><br></div>

</body>
</html>
You find the files on my server, please test it and tell me about the
results. Of course I have XMLHttpRequest switched on in IE7. In Firefox
you see a big list (inspected XML object), in IE7 I see nothing.

Thank you for your help!

Sep 27 '06 #11
OK my last knowledge is: IE5/6/7 does not support responsXML. I have
now implemented a fallback solution that enables XML support.

But better:

http://dropie.com/

;)

Sep 27 '06 #12
Hi,

webEater wrote:
OK my last knowledge is: IE5/6/7 does not support responsXML. I have
now implemented a fallback solution that enables XML support.

But better:

http://dropie.com/

;)
I am starting to think that you are but a troll. What's your agenda?

Internet Explorer of course does support responseXML. I am not sure what
you try to achieve by spreading false information, but I think that your
domain name gives an indication at the impartialness of your research.

Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Sep 28 '06 #13
webEater wrote:
OK my last knowledge is: IE5/6/7 does not support responsXML.
That is not knowledge. The ActiveX object(s) used for xml http requests
in IE 5 and 6 certainly do support responseXML, if properly used. There
is no question of that, they have been being used for years.

If you are drawing these conclusions then it becomes clear that the
problem is in your code, and is fundamental.

I have now implemented a fallback solution that enables
XML support.
It would have been better to identify what you were doing wrong in the
first place. Though you are on your own as far as that goes as my
employer's proxy refuses to connect to the domain used in your examples
so I can only see the incomplete fragment of code you posted here.

Richard.

Sep 28 '06 #14
my ie installation mest be buggy then, probably because of
(de)installing ie7 several times.
my experience is that ie installations are very unstable because the
main installation is anchored in the system and even the standalone
versions access collective settings.

i will test it on another system, thank you!

Sep 30 '06 #15

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Chris Smith | last post: by
2 posts views Thread by Marco Laponder | last post: by
4 posts views Thread by Sanjay Dahiya | last post: by
3 posts views Thread by joker | last post: by
3 posts views Thread by Alexander Mikhailian | last post: by
7 posts views Thread by KaNos | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.