Search local hard drive for all the copies of the :: Dec 17, 2002 But my problem I can not figure out how to search for the same name of the You have two global variables sDBNewPath and sDBBackupPath which are supposed You seem to be doing a very weird thing in this function. http://answers.google.com/answers/threadview/id/125376.htmlHOME | Hi guys, i am having a wierd problem with setting some global vars from a dynamically loaded xml file. When the xml is loaded i am starting a function to store the data in some global vars, when i trace the global var within the function, the trace works perfectly. But however if i try to trace it on the root, the trace comes out undefined.
i have tried all sort of things but nothing comes in mind to fix it, maybe you guys can help me.
heres the code
attached are the files
AS:Code
var Conf = new Array();
xmlConfig = new XML();
xmlConfig.ignoreWhite = true;
xmlConfig.onLoad = loadConfigXML;
xmlConfig.load("config.xml");
function loadConfigXML(loaded) {
if (loaded) {
this.smartparser(Conf);
} else {
content = "where is the xml?!";
}
loadUrls();
}
//------------------------------------------------------------------
// XML SMARTPARSER
//------------------------------------------------------------------
XML.prototype.smartparser = function(holder) {
for (this.n=0; this.n
this.Item = this.firstChild.childNodes[this.n];
if (this.Item.nodeName == "topfeature" or this.Item.nodeName == "dsk01" or this.Item.nodeName == "dsk02" or this.Item.nodeName == "promos" or this.Item.nodeName == "musicplayer") { Marine Industry:: Jun 15, 2006 "In 2004 Brunswick had $5.23 billion in the global retail market. A global leader in the leisure products industry, the company's http://answers.google.com/answers/threadview/id/738402.htmlHOME | Linux: samba error:: Aug 12, 2004 Global Settings ===================================== [global] .. By the way, in /var/log/samba there will be a few log files in there, http://answers.google.com/answers/threadview/id/375705.htmlHOME |
if (this.Item.firstChild.nodeType == 3) {
holder.push(this.Item.firstChild.nodeValue);
//holder[this.Item.nodeName] = this.Item.firstChild.nodeValue;
} else {
if (this.Item.nodeValue == null) {
tmp = holder[holder.length]=new Array();
newxml = new XML(this.Item);
newxml.smartparser(tmp);
}
}
} else {
if (this.Item.firstChild.nodeType == 3) {
//holder.push(this.Item.firstChild.nodeValue);
holder[this.Item.nodeName] = this.Item.firstChild.nodeValue; Ada program using generic package:: Jan 6, 2003 The problem I have now is that I can not compile it. Assuming the global variable is initialized is not recommended. . The variables in the main program include Big_Line - a string array long enough to fit the http://answers.google.com/answers/threadview/id/127046.htmlHOME | Check our documentation for spelling & obvious :: Fixed problem where DLLs might extract to %SystemSystem% if thinstall becomes confused .. install system DLLs, and set global environment variables. the changes they make to your data can cause it ** crash or do weird things. http://answers.google.com/answers/threadview/id/342247.htmlHOME |
} else {
if (this.Item.nodeValue == null) {
tmp = holder[holder.length]=new Array();
newxml = new XML(this.Item);
newxml.smartparser(tmp);
}
}
}
}
};
//------------------------------------------------------------------
function loadUrls() {
_global.topfeature = Conf[0];
_global.dsk01 = Conf[1];
_global.dsk02 = Conf[2];
_global.promos = Conf[3];
_global.musicplayer = Conf[4];
trace(_global.topfeature);
}
trace(_global.topfeature);
stop();
XML:Code
http://192.168.0.2/cms/topfeature.php
http://192.168.0.2/cms/section.php
http://192.168.0.2/cms/content.php
http://192.168.0.2/cms/promos.php
http://192.168.0.2/tone.php?id=
Probably what might be happening is that the trace at the bottom of the code, outside of the function is happening before the xml is beeing loaded and added to the array, probably i will have to check if the xml is loaded before i can declare the global vars. It just makes me a bit nervouse because if this is so, I will have to change some other code....
I think that might be it...
But it sure would be nice to know what you guys have to say...
Any ideas ?
Or is my code so ugly no one wants to even look at it ?
Challenging Books For A 14 Year Old?
First guitar : acoustic or electric?
|