As I stated before,
“Internet Explorer is officially unsupported at my website”,
as this browser, made by some company named Microsoft,
does’t comply to the W3C standards, one must develop
the site twice, once for standard complaint browsers and
once for microsoft browsers (and since it differs a lot
between versions of it’s browser, maybe even more)
As I’ve noticed with the BlaatSchaap site, Internet
Explorer has improved a little, and is since version 8
capable of *rendering* the html/css correctly. WOW!
I mean…. Internet Explorer 6 and 7. When I tell it to
draw two boxes, two divs, with a border, with the same
heigth, next to each other, they will turn op with
a different heigth, and it even differs between
version 6 and 7. I’ve had these issues when I
had this separated Radio BlaatSchaap site where
Eileen insisted on Internet Explorer support. As it
was just a static site, it was not that much trouble.
But still…. seeing what Internet Explorer managed
to put on the screen…..
Well…. now…. version 8. I am surprised it seems to
support XMLHttpRequest correctly. WOW! As in
older versions it seems, one must work with
*shiver* ActiveX stuff. A nightmare!
But, as expected, the site crashed immediately.
It was reporting errors about not being able to
obtain the language strings from the server.
So, I immediately suspected the XMLHttpRequest.
But that one turned out to behave as expected,
no, the problem seems to be in the processing
of the received XML data.
var xmldoc = http.responseXML;
var xmlstrings = xmldoc.getElementsByTagName(“strings”)[0];
for(i=0; i < xmlstrings.getElementsByTagName("string").length; i++){
var xmlstring = xmlstrings.getElementsByTagName(“string”)[i];
var objstring = new Object();
alert(xmlstring.getElementsByTagName(“lang”)[0].textContent)
objstring[“lang”] = xmlstring.getElementsByTagName(“lang”)[0].textContent;
objstring[“type”] = xmlstring.getElementsByTagName(“type”)[0].textContent;
objstring[“text”] = xmlstring.getElementsByTagName(“text”)[0].textContent;
objstring[“locked”] = xmlstring.getElementsByTagName(“locked”)[0].textContent;
strings.push(objstring);
}
This script appears to work on all modern browsers
except Internet Explorer. (Internet Explorer should be
concidered a modern browser when one looks at it’s
release date.)
Hopefully it gets better next version. But I will write my
website according to the W3C standards. If some
American company decides to invent their own ‘standards’,
then that is not my problem. My site is standards complaint,
if your browser is not, don’t blaim be.
Oh yes, some people will say, but those n00bs don’t
know better, and will use what’s pre-installed. Well,
exactly that *is* the problem why that damn piece
of junk is so popular. And it’s also why the EU
government forced Microsoft so implement a browser
selection program into their Operating System,
I think it’s called ‘Windows’
Oh…. enough ranting about Microsoft now… back
to randing about Internet Exploders crappy JavaScript
implementation. So, for some reason, it doesn’t execute
the script above according to what it’s told to do.
After debugging a bit, it seems to go wrong at the
last step. .textContent is *NOT* supported
by Internet Explorer. After googeling a bit I found
http://www.hiteshagrawal.com/javascript/javascript-parsing-xml-in-javascript
text
Returns the text content assigned to the tag elements. This property cannot be used for reading attribute content. Also this property can only be used for Microsoft Browsers
Syntax:
xml_object.current_pointing_node.texttextContent
Returns the text content assigned to the tag elements. This property cannot be used for reading attribute content. Also this property can only be used for Mozilla, Firefox, Opera Browsers
Syntax:
xml_object.current_pointing_node.textContent
So, appearently in Microsoft JScript it’s called text and
in standard ‘rest-of-the-world’ JavaScript it’s called
textContent. Do you get my problem with Microsoft?
Do you get what I mean with non-standard-complaint?
Yes, I have been complaining about Firefox before,
but that’s still different, because, the other browsers
were supporting an extra feature, but didn’t implement
a feature completely different, and with a little tweak,
the code ran in all standards-complant browsers.
With this Microsoft Browser, I will litterly need to do a
if (microsoft) then {……text} else {…..textContent}
*and* I will need to make this change *everywhere*
where I am parsing XML data. And since I’m developing
a site that is fully AJAX driven, XML parsing in JavaScript,
this will be a pain in the ass to make it Microsoft-compatible,
and will increase the size of the scripts as well, and so
increase the load times of the site as well.
So, I stick to my statement I’ve made years ago:
Microsoft Browsers are not supported my site.
« One more try, Audio tag, Cross Domain XMLHttpRequests BlaatSchaap »