Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Web Design, HTML And CSS Forums (http://www.go4expert.com/forums/web-design-forum/)
-   -   vbscript function to add items from a treeview node to a listbox (http://www.go4expert.com/forums/vbscript-function-add-items-treeview-t5906/)

sans123 17Aug2007 14:09

vbscript function to add items from a treeview node to a listbox
 
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

Code:

<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>"
Else
str = Replace(str,"<DIV class=list>&nbsp;" & SelectedNode.getAttribute("id") & "</DIV>","")
End If
document.all.item("lstMultipleFileUpload").innerHTML= "" & str                       
</script>


pradeep 18Aug2007 13:26

Re: vbscript function to add items from a treeview node to a listbox
 
What is error you are facing??


All times are GMT +5.5. The time now is 13:31.