WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 XLoadTree: Adding SRC does not enable use of reload, Micha Schopman, April 15, 2003

Subject: XLoadTree: Adding SRC does not enable use of reload From: Micha Schopman Date: April 15, 2003

I use the tree to display a filesystem. When I add a node to an empty node I add a new src to it, because it now contains a child. Reloading it after appending the src attributes gives an error.

 function treeReload(behavior){
  if(behavior == 'parentnode'){
   if(tree.getSelected().xmlNode){
    tree.getSelected().parentNode.reload();
   }else{
    document.location.reload();
   }
  }else if(behavior == 'selectednode'){
   if(tree.getSelected().xmlNode){
    if(!tree.getSelected().src){
     newPath = path;
     if(path.length > 0){
      newPath += '/'+name;
     }else{
      newPath += name;
     }
     
     tree.getSelected().src = 'treenodes.cfm?parentfolder='+newPath;
     alert('The reload here fails');
     tree.getSelected().reload();
    }else{
     tree.getSelected().expand();
     tree.getSelected().reload();
    }
   }else{
    document.location.reload();
   }
  }
 }




Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX