mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 04:24:14 +09:00
AJAX call시에 return 받은 xmlDoc을 parsing하는 javascript를 정상동작하도록 마무리 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4249 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b05cc853c6
commit
46f570bed2
2 changed files with 19 additions and 17 deletions
|
|
@ -401,6 +401,7 @@ function displayPopupMenu(ret_obj, response_tags, params) {
|
|||
} else {
|
||||
if(menus) {
|
||||
var item = menus['item'];
|
||||
if(item.length<1) item = new Array(item);
|
||||
if(item.length) {
|
||||
for(var i=0;i<item.length;i++) {
|
||||
var url = item[i].url;
|
||||
|
|
|
|||
|
|
@ -169,13 +169,14 @@ function xml_parseXmlDoc(dom) {
|
|||
while(obj) {
|
||||
if(obj.nodeType == 1) {
|
||||
|
||||
if(obj.firstChild && obj.lastChild && obj.firstChild == obj.lastChild) {
|
||||
var name = obj.nodeName;
|
||||
var value = obj.firstChild.nodeValue;
|
||||
ret_obj[name] = value;
|
||||
var value = null;
|
||||
|
||||
if(obj.childNodes.length==1 && obj.firstChild.nodeType != 1) {
|
||||
value = obj.firstChild.nodeValue;
|
||||
} else {
|
||||
var name = obj.nodeName;
|
||||
var value = this.parseXMLDoc(obj);
|
||||
value = this.parseXMLDoc(obj);
|
||||
}
|
||||
|
||||
if(typeof(ret_obj[name])=='undefined') {
|
||||
ret_obj[name] = value;
|
||||
|
|
@ -189,7 +190,7 @@ function xml_parseXmlDoc(dom) {
|
|||
ret_obj[name][ret_obj[name].length] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
obj = obj.nextSibling;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue