First, thanks for creating and supporting an excellent framework! It
shows that this thing resulted from practical needs.
Now my issue. I am making a generating a menu editor via doXHR. It is
grabbing a XML file provided by my
CodeIgnter backend. I then use MochiKi.DOM (thanks a million!) to
create and append a 'editor' of sorts. This works perfectly on
Firefox, and has a minor DOM issue on Opera, but for some reason the
XMLHttpRequest is never made on IE6 and 7. I am using code downloaded
via svn today. I have tried replacing my callback with a simple alert
in the function, but still no request is made. What follows is most of
the code I am referring to. Forgive that tabbing.
/*********************************
CODE
**********************************/
// XHR for menu xml
var client = doXHR(
MENU_EDITOR_CONTENT_URL, // Menu xml url
{headers: {'Accept': 'text/xml'}, // We want XML
mimeType: 'text/xml'} // mimetype should be XML
);
// Define callback function
client.addCallback(function(response){
log('xhr');
/* Will handle the XML and format it for editing on the
administative page */
/
**************************************************************************************/
/* START -> XML MENU DATA */
/
**************************************************************************************/
// Store XML for menu
var menu_xml = response.responseXML;
// Create an array to store menu_tabs in
var menu_tabs = new Array();
// Grab document's datetime
var document_datetime =
menu_xml.documentElement.getAttribute('datetime');
// Get each menu_tab's data
for(var i = 0; i <
menu_xml.getElementsByTagName('menu_tab').length;
i++){
// Create and array for menu_tabs[i]
menu_tabs[i] = new Array();
// Get menu_tab's id
menu_tabs[i]['id'] =
menu_xml.getElementsByTagName('menu_tab')
[i].getAttribute('id');
// Get menu tab's class
menu_tabs[i]['class'] =
menu_xml.getElementsByTagName('menu_tab')
[i].getAttribute('class');
// Get menu tab's name
menu_tabs[i]['name'] =
menu_xml.getElementsByTagName('menu_tab')
[i].childNodes[1].firstChild.nodeValue;
// Get each submenu_tab that is associated with this
menu_tab
var count = 0; // Increment for index of submenu_tab
for(var j = 0; j <
menu_xml.getElementsByTagName('menu_tab')
[i].childNodes.length; j++){
// Work only with nodes labeled 'submenu_tab'
if(menu_xml.getElementsByTagName('menu_tab')
[i].childNodes[j].nodeName == 'submenu_tab'){
// Create array for
menu_tabs[i]['submenu_tabs']
menu_tabs[i]['submenu_tabs'] = new
Array();
// Create array for
menu_tabs[i]['submenu_tabs'][count]
menu_tabs[i]['submenu_tabs'][count] =
new Array();
// Get submenu tab's id
menu_tabs[i]['submenu_tabs'][count]['id'] =
menu_xml.getElementsByTagName('menu_tab')
[i].childNodes[j].getAttribute('id');
// Get submenu tab's class
menu_tabs[i]['submenu_tabs'][count]['class'] =
menu_xml.getElementsByTagName('menu_tab')
[i].childNodes[j].getAttribute('class');
// Get submenu tab's name
menu_tabs[i]['submenu_tabs'][count]['name'] =
menu_xml.getElementsByTagName('menu_tab')
[i].childNodes[j].childNodes[1].firstChild.nodeValue;
// Get submenu tab's link
menu_tabs[i]['submenu_tabs'][count]['link'] =
menu_xml.getElementsByTagName('menu_tab')
[i].childNodes[j].childNodes[3].firstChild.nodeValue;
// Increase count
count++;
}else{
continue;
}
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---