toutouffe
Messages postés43Date d'inscriptionsamedi 22 janvier 2005StatutMembreDernière intervention13 juillet 2005
-
29 juin 2005 à 12:26
toutouffe
Messages postés43Date d'inscriptionsamedi 22 janvier 2005StatutMembreDernière intervention13 juillet 2005
-
29 juin 2005 à 12:30
Coucou,
J'ai un fichier XML qui est charge, et la navigation marche bien. Mais
des que je veux créer des fonctions pour faciliter et automatiser la
navigation, ca merde...
voila mon code :
function init(){
// Initialisation XML
album_xml = new XML();
album_xml.onLoad = loadTest;
album_xml.load("album.xml");
album_xml.ignoreWhite = true;
}
function loadTest(loaded){
if(loaded){
main();
}else{
error();
}
}
function main(){
rootNode = album_xml.firstChild;
rootNode = rootNode.firstChild;
rootNode = rootNode.nextSibling;
...
}
Si je remplace " rootNode = rootNode.nextSibling; " par une fonction :
function navigRepertoire(noeud){
noeud = noeud.nextSibling;
return(noeud);
}
et donc je l'appel avec "rootNode=navigRepertoire(rootNode);"
ca marche pas !!!
Donc voila, si quelqu'un a une solution, ce serait cool.