vbscript function to add items from a treeview node to a listbox

sans123's Avatar
Newbie Member
Below is the vbscript function.
I want to display all the items selected from the node(SelectedNode) inside the listbox(lstMultipleFileUpload)which is inside a div tag in the HTML page

<script language="vbscript" for="FileListTreeView" event="oncheck">
Dim SelectedNode	
Dim str
Set SelectedNode = FileListTreeView.getTreeNode(window.event.TreeNodeIndex)			
str = "" & document.all.item("lstMultipleFileUpload").innerHTML					
If (SelectedNode.getAttribute("Checked") ) Then
str = str & "<DIV class=list>&nbsp;" & SelectedNode.getAttribute("id") & "</DIV>"
str = Replace(str,"<DIV class=list>&nbsp;" & SelectedNode.getAttribute("id") & "</DIV>","")
End If
document.all.item("lstMultipleFileUpload").innerHTML= "" & str			

Last edited by shabbir; 17Aug2007 at 14:17.. Reason: Code block - http://www.go4expert.com/forums/misc.php?do=bbcode#code
pradeep's Avatar, Join Date: Apr 2005
Team Leader
What is error you are facing??