hi,
JAVASCRIT
the actual program reads and prints values from a checkbox tree and this piece of code does it.
dhtmlXTreeObject.prototype.getAllChecked=function(){
return this._getAllChecked("","",1);
}
dhtmlXTreeObject.prototype.getAllCheckedBranches=function(){
return this._getAllChecked("","",0);
}
dhtmlXTreeObject.prototype._getAllChecked=function(htmlNode,list,mode){
if(!htmlNode)htmlNode=this.htmlNode;
if(((mode)&&(htmlNode.checkstate==1))||((!mode)&&(htmlNode.checkstate>0))){if(list)list+=","+htmlNode.id;else list=htmlNode.id;}
var j=htmlNode.childsCount;
for(var i=0;i<j;i++)
{
list=this._getAllChecked(htmlNode.childNodes[i],list,mode);
};
if(list)return list;else return "";
};
the values are returned to alertbox.
<a href="javascript:void(0);" onclick="alert(tree2.getAllChecked());">Get list of checked</a><br><br>
kindly help me with reading the returned values in to an array or list (but bot in alertbox) ...so that i can pass them to next JSP page.
waiting for ur answer,
BeanBoy !