Tuesday, December 13, 2005

I know Microsoft made the first version of AJAX...

...but if they can't implement half of its uses correctly they shouldn't pretend to support it.

Well, technically I guess they haven't even bothered to pretend they support the XMLHttpRequest object (unless you count their fucked up view of how you should get to XML methods from JavaScript). Since all of us have to resort to a series of if/then statements just to create one fucking object in more than one browser.

That doesn't even begin to talk about the frustration IE creates when you try to use the goddamn thing. For instance:
  1. I have an XMLHttpRequest I need to make
  2. It uses a unique token to keep track of which request has just loaded and where the response should go.
  3. Since it uses XML (and IE fucking chokes on application/xml, but I'll save that for another post), I have the XML responses getting served as text/xml.
  4. I need to copy the contents of an element (which has an xmlns="http://www.w3.org/1999/xhtml" as it should) into the DOM
You'd think that importing nodes using something (say...element.importNode) would work without the browser all but crashing on you. You'd think that IE would recognize that you have an XHTML DOM in the browser window and an XHTML DOM in the form of element X.

But no.

In comes yet another fucking if/then for IE.

However...wait for it...IE can't handle its own required call to element.cloneNode. Because I have a form coming in.

Fine, I'll take the form out and copy form inputs into the fucking thing. But the most I can get out of the piece of crap: null. Yes, it takes the XML response, recognizes the nodes enough for me to get the token back out of it and then it chokes and dies on the element using the XHTML namespace.

Brilliant.

I'll post the work-around later...once I make one.

Labels: ,

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home