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 {
|
} else {
|
||||||
if(menus) {
|
if(menus) {
|
||||||
var item = menus['item'];
|
var item = menus['item'];
|
||||||
|
if(item.length<1) item = new Array(item);
|
||||||
if(item.length) {
|
if(item.length) {
|
||||||
for(var i=0;i<item.length;i++) {
|
for(var i=0;i<item.length;i++) {
|
||||||
var url = item[i].url;
|
var url = item[i].url;
|
||||||
|
|
|
||||||
|
|
@ -169,13 +169,14 @@ function xml_parseXmlDoc(dom) {
|
||||||
while(obj) {
|
while(obj) {
|
||||||
if(obj.nodeType == 1) {
|
if(obj.nodeType == 1) {
|
||||||
|
|
||||||
if(obj.firstChild && obj.lastChild && obj.firstChild == obj.lastChild) {
|
|
||||||
var name = obj.nodeName;
|
var name = obj.nodeName;
|
||||||
var value = obj.firstChild.nodeValue;
|
var value = null;
|
||||||
ret_obj[name] = value;
|
|
||||||
|
if(obj.childNodes.length==1 && obj.firstChild.nodeType != 1) {
|
||||||
|
value = obj.firstChild.nodeValue;
|
||||||
} else {
|
} else {
|
||||||
var name = obj.nodeName;
|
value = this.parseXMLDoc(obj);
|
||||||
var value = this.parseXMLDoc(obj);
|
}
|
||||||
|
|
||||||
if(typeof(ret_obj[name])=='undefined') {
|
if(typeof(ret_obj[name])=='undefined') {
|
||||||
ret_obj[name] = value;
|
ret_obj[name] = value;
|
||||||
|
|
@ -189,7 +190,7 @@ function xml_parseXmlDoc(dom) {
|
||||||
ret_obj[name][ret_obj[name].length] = value;
|
ret_obj[name][ret_obj[name].length] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
obj = obj.nextSibling;
|
obj = obj.nextSibling;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue