Solved

Coldfusion cflayout and cftree tag

Posted on 2009-05-05
4
402 Views
Last Modified: 2013-12-24
Hi Experts..

I am working on a website which has created four layouts using cflayout tags like TOP, LEFT,CENTER, BOTTOM, RIGHT.

Now in the left cflayout, i did <cfinclude template="navigation.cfm">

it loads perfectly.

now i have a cftree code in it which is below attached.

i want that when i click the tree item it should load the contents in the cflayoutarea CENTER area.

is that possible. if so how? can u guys provide me a way for doing it. i am just started playing with cflayout tag yet!

Please Help Me


<cfinvoke component="#request.cfcPath#.tools" method="getcategories" returnvariable="showcats"/>

<table width="100" border="0" cellspacing="0" cellpadding="0">

<CFFORM ACTION="OpenItem.cfm" preservedata="yes" timeout="1000000"> 

<tr><td>

    <CFTREE NAME= "Categories" border="no" font="Verdana, Geneva, sans-serif" fontsize="11" highlighthref="yes" lookandfeel="MOTIF" HEIGHT="500" WIDTH="200" format="flash" notsupported="Please Install Flash to View all Categories" appendkey="no" align="middle"> 

    <CFLOOP QUERY="showcats"> 

        <CFTREEITEM VALUE="#ItemID#" PARENT="#ParentItemID#" DISPLAY="#catname#" EXPAND="no" img="images/folder.gif" href="showcategories.cfm?action=#itemID#"> 

    </CFLOOP> 

    </CFTREE></td></tr> 

</CFFORM> 

</table>

Open in new window

0
Comment
  • 3
4 Comments
 
LVL 1

Expert Comment

by:stmatth
ID: 24354716
The easiest way I found was to write a function that accepts the selected tree item value and uses ColdFusion.navigate to open showcategories.cfm in the desired cflayoutarea.

The href parameter in your <cftreeitem would contain "javascript:functionName(value);"
0
 
LVL 1

Expert Comment

by:stmatth
ID: 24354773
actually, if all you need is to open the page within the <cflayout area, all you need in the href param is:

javascript:ColdFusion.navigate('showcategories.cfm?action=#itemID#','cflayoutareaname');
0
 
LVL 15

Author Comment

by:Gurpreet Singh Randhawa
ID: 24354913
'cflayoutareaname'. in this will i call the subcategies page by cfinclude
0
 
LVL 1

Accepted Solution

by:
stmatth earned 500 total points
ID: 24354977
'cflayoutareaname represents whatever name you are going to give the cflayoutarea in which you wish the showcategories.cfm page to appear.

You shouldn't need to use <cfinclude> since the ColdFusion.navigate will populate the cflayoutarea for you
0

Featured Post

New My Cloud Pro Series - organize everything!

With space to keep virtually everything, the My Cloud Pro Series offers your team the network storage to edit, save and share production files from anywhere with an internet connection. Compatible with both Mac and PC, you're able to protect your content regardless of OS.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now