Xml support in AjaxTK

Have a great idea for extending Zimbra? Share ideas, ask questions, contribute, and get feedback.
Post Reply
sixstone
Posts: 1
Joined: Fri Sep 12, 2014 9:58 pm

Xml support in AjaxTK

Post by sixstone »

Hi everyone!
At first, I would like to congratulate you for this brand tool. I'm especially interested in the AjaxTK, I have read all the documentation Zimbra offers and I've just probed xml package as a cross-browser (at least Mozilla and IE) tool to manipulate XML documents.
I noticed that loading from url is totally ashyncronous, however the way to handle when xml loading is finished varies between Mozilla and IE. From IE, the event is handling with the variable readyState, but in my Mozilla Firefox 1.0.7 this variable doesn't exist, so I must create by my own with these lines of code that I set outside from AjxXmlDoc.js:
code:

if ( AjxEnv.isNav ) {

if ( XMLDoc.getDoc().readyState == null ) {

XMLDoc.getDoc().readyState = 1;

XMLDoc.getDoc().addEventListener("load", function() {

XMLDoc.getDoc().readyState = 4;

if (typeof XMLDoc.getDoc().onreadystatechange == "function" ) {

XMLDoc.getDoc().onreadystatechange();

}

}, false);

}

}

end's code
I don't know if it is the only way to do but it's the only one that I found.
Thank you in advance for your replies.
Best regards!
Post Reply