Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Flash Integration / April 2009



Tip: Looking for answers? Try searching our database.

cftree flash format

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gekko64 - 09 Mar 2007 01:43 GMT
I have a client who is griping that they have to click on the arrow on
the cftree(flah format). Is there a way to allow them to click on the
folder or the whole row to open instead of the arrow? All help is appreciated.
Thanks,
SC
BKBK - 10 Mar 2007 15:25 GMT
There are 2 versions. The attribute <cfformitem type="script"> only became
available with the coming of the MX7 Updater.

<!--- ======== cfsavecontent hack: pre ColdFusion MX7 Updater ======= --->
<cfsavecontent variable="makeRowClickable">
    /*
    By default you can only click on the arrow of a cftree (flash format) to open
or close it. This script enables you to click not just on the arrow, but also
on the folder icon or, in fact, anywhere on the whole row, to open or close an
item.
    */
    var theTree=treeObj;
    var thisNode=theTree.selectedNode;
    var idx = theTree.getDisplayIndex(thisNode);
         if (theTree.getIsOpen(thisNode)){
            theTree.setIsOpen(thisNode,false);
         }
         else {
             theTree.setIsOpen(thisNode,true);
         }
    thisNode=theTree.getNodeDisplayedAt(idx);  
</cfsavecontent>

<cfform name="treeClickForm" action="#cgi.script_name#" format="Flash">
    <cftree name="treeObj" format="object" hscroll="No" vscroll="No" border="No"
onchange="#makeRowClickable#" >
      <cftreeitem value="Divisions">
      <cftreeitem value="Development"
         parent="Divisions" img="folder">
      <cftreeitem value="Product One"
         parent="Development" img="document">
      <cftreeitem value="Product Two"
         parent="Development">
      <cftreeitem value="GUI"
         parent="Product Two" img="document">
      <cftreeitem value="Kernel"
         parent="Product Two" img="document">
      <cftreeitem value="Product Three"
         parent="Development" img="document">
      <cftreeitem value="QA"
         parent="Divisions" img="folder">
      <cftreeitem value="Product One"
         parent="QA" img="document">
      <cftreeitem value="Product Two"
         parent="QA" img="document">
      <cftreeitem value="Product Three"
         parent="QA" img="document">
      <cftreeitem value="Support"
         parent="Divisions" img="fixed">
      <cftreeitem value="Product Two"
         parent="Support" img="document">
      <cftreeitem value="Sales"
         parent="Divisions" img="computer">
      <cftreeitem value="Marketing"
         parent="Divisions" img="remote">
      <cftreeitem value="Finance"
         parent="Divisions" img="element">
    </cftree>
    <!--- <cfinput name="sbmt" type="Submit" value="submit"> --->
</cfform>

<!--- ===== cfformitem version: for ColdFusion MX7 Updater or newer ===== --->
<cfform name="treeClickForm" action="#cgi.script_name#" format="Flash">
    <cfformitem type="script">
        function makeRowClickable () {
           
            /*
            By default you can only click on the arrow of a cftree (flash format) to
open or close it. This script enables you to click not just on the arrow, but
also on the folder icon or, in fact, anywhere on the whole row, to open or
close an item.
             */
           
            var theTree = treeObj;
            var thisNode=theTree.selectedNode;
            var idx = theTree.getDisplayIndex(thisNode);
                 if (theTree.getIsOpen(thisNode)){
                    theTree.setIsOpen(thisNode,false);
                 }
                 else {
                     theTree.setIsOpen(thisNode,true);
                 }
            thisNode=theTree.getNodeDisplayedAt(idx);
        }
    </cfformitem>
    <cftree name="treeObj" format="object" hscroll="No" vscroll="No" border="No"
onchange="makeRowClickable()" >
      <cftreeitem value="Divisions">
      <cftreeitem value="Development"
         parent="Divisions" img="folder">
      <cftreeitem value="Product One"
         parent="Development" img="document">
      <cftreeitem value="Product Two"
         parent="Development">
      <cftreeitem value="GUI"
         parent="Product Two" img="document">
      <cftreeitem value="Kernel"
         parent="Product Two" img="document">
      <cftreeitem value="Product Three"
         parent="Development" img="document">
      <cftreeitem value="QA"
         parent="Divisions" img="folder">
      <cftreeitem value="Product One"
         parent="QA" img="document">
      <cftreeitem value="Product Two"
         parent="QA" img="document">
      <cftreeitem value="Product Three"
         parent="QA" img="document">
      <cftreeitem value="Support"
         parent="Divisions" img="fixed">
      <cftreeitem value="Product Two"
         parent="Support" img="document">
      <cftreeitem value="Sales"
         parent="Divisions" img="computer">
      <cftreeitem value="Marketing"
         parent="Divisions" img="remote">
      <cftreeitem value="Finance"
         parent="Divisions" img="element">
    </cftree>
    <!--- <cfinput name="sbmt" type="Submit" value="submit"> --->
</cfform>
Allan Jagos - 09 Apr 2009 17:09 GMT
All rows including the bottom-level ones that when clicked would go off and do something.  With this code above in place, those bottom-level rows don't open up but rather do nothing.  How can this concept appy only to folders and not the underlying item?

Thanks,
Alla

From http://www.developmentnow.com/g/66_2007_3_0_0_942739/cftree-flash-format.ht

Posted via DevelopmentNow.com Group
http://www.developmentnow.com/g/
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.