0 Replies Latest reply on Feb 15, 2013 9:25 AM by Kurt48

    bind cftree to cfinput xml forms

    Kurt48 Level 1

      I have some code that lists the contents of a folder on the server and lets the user select a file.  It works fine with flash but not with html or xml forms. How can I makes this work without flash?

       

      the bind attribute in cfinput tags below is not working with xml or html any ideas?  Is there an easy way to make it work?

       

       

          <cfset defaultDirectory="d:\myfiles\">
          <cfdirectory action="LIST" directory="#defaultDirectory#" name="fileDirectory" recurse="yes">
          <!---<cfdump var="#fileDirectory#">--->
         
          <cfform format="flash" action="selectFiles.cfm" method="post" target="selectFilesFrame" name="treeForm">
                  <cftree name="fileTree" width="300" height="500">
                      <cfloop query="fileDirectory">
                          <cftreeitem value="#fileDirectory.Directory#\#fileDirectory.Name#" display="#fileDirectory.Name#" parent="#fileDirectory.Directory#" expand="no">
                      </cfloop>
                  </cftree>
              
                  <cfinput name="fileName" type="hidden" disabled="true" label="File Name" width="200" bind="{fileTree.selectedNode.getProperty('data').display}" required="yes" message="You must select a file.">
                  <cfinput name="filePath" type="hidden" label="File Path" width="300" bind="{fileTree.selectedNode.getProperty('data').value}" required="yes" message="You must select a file.">

       

       

                  <cfinput type="Submit" name="Submit" value="Select File">
          </cfform>