Web-client javascript is even worse than VRML-client javascript (And VRML-client javascript was pretty fundamentally broken)


Today has been an all-consuming quest to get new Ajax features working. Spent a huge part of the day looking for a standard, reliable way to convert a passed XML string (i.e. passed from the Nevow LivePage) into a set of XML DOM nodes.

AFAICT there's no standard mechanism available, though there's an article which describes how to make Mozilla pretend to be like IE, but what I want is to make IE work like Mozilla (and then make Konqueror and the rest work too), i.e. don't replace the whole current document, just give me back the nodes in the document.

Is every Ajax developer really writing their own library here? That seems a little nuts, these are things that should be entirely standardised and part of the platform. Bad javascript! Bad!

[Later]

Turns out that the (hack) innerHTML code that Nevow's javascript library uses actually does work, it was just getting an XML-escaped version of the code from the Python side (Nevow automatically HTML-escapes strings that you return via LivePage). Problem now is that I've read so much saying that assigning to innerHTML with XML code is fragile that I don't really trust it. Ah well, figure it out tomorrow I suppose.

Comments

  1. Adam V.

    Adam V. on 07/05/2005 10:14 a.m. #


    I haven't found innerHTML to be particularly fragile. Seems the non-IE browser makers just gave in and implemented it.

Comments are closed.

Pingbacks

Pingbacks are closed.