1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Web Design, HTML And CSS' started by sans123, Aug 17, 2007.

  1. sans123

    sans123 New Member

    Joined:
    Aug 17, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    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>
     
    Last edited by a moderator: Aug 17, 2007
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,646
    Likes Received:
    86
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    What is error you are facing??
     

Share This Page