Solved

CFTree and Frames problem

Posted on 2000-02-23
12
328 Views
Last Modified: 2013-12-24
I have a CFTree in a three frame page with the target set to the larger frame. When trying the links in the tree, in NS4.7, it will either open the link in a new window or it breaks out of the frames in the same window.

If I name the target "_parent" or "_main", it opens in the same window, anything else, it opens a new window.

It works fine in IE5.

{I don't have access to the code right now as I am in a FastTrack to ColdFusion class and not at work!}
0
Comment
Question by:EddieShipman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
12 Comments
 
LVL 5

Expert Comment

by:nathans
ID: 2551659
When you can post the code so we can work on it.

I wish I could have taken a CLASS on ColdFusion......  :(

Nathan Stanford
Mr. ColdFusion
==========================
Check out my e-ZINE
ColdFusion Tips Plus
http://www.nsnd.com/cftips
or send a blank email to
subscribe-cftips@nsnd.com
0
 
LVL 26

Author Comment

by:EddieShipman
ID: 2552000
I'm trying to get a co-worker to send it to my web-based mail account so I
can post it. Maybe later today...
0
 
LVL 5

Accepted Solution

by:
nathans earned 100 total points
ID: 2552103
Here is a sample that works:
1. Frame File
2. Top Frame
3. Tree Frame
4. Body Frame
5. New Frame for Body



1. Frame File
============= index.cfm ==============
<!-- frames -->
<frameset  rows="100,*">
    <frame name="top" src="top.cfm" marginwidth="0" marginheight="0" scrolling="auto" frameborder="0" noresize>
    <frameset  cols="250,*">
        <frame name="tree" src="tree.cfm" marginwidth="5" marginheight="0" scrolling="auto" frameborder="0">
        <frame name="BODY" src="body.cfm" marginwidth="0" marginheight="0" scrolling="auto" frameborder="0">
    </frameset>
</frameset>

=====================================
2. Top Frame
=====================================

<html>
<head>
      <title></title>
</head>

<body>

<font size="+3">TITLE OF PAGE</font>

</body>
</html>

=====================================

3. Tree Frame
=====================================

<HTML><HEAD>
    <TITLE>MyFamily</TITLE>
</HEAD><BODY bgcolor="ffffff">
<FONT size="+2"><B>MyFamily</B></FONT>
<P>
<CFQUERY name="GetTreeData" dataSource="test">
    SELECT DISTINCT people.State, City,Name
    FROM people
</CFQUERY>
<CFFORM action="MyFamily.cfm" method="POST" target="BODY">
<CFTREE name = "Tree"
      height = "200"
      width = "230"
      highlightRef = "no"
      >
      <CFTREEITEM value="0" display="MyFamily" expand="yes">
      <CFSET CurGroup1 = "">
      <CFLOOP query="GetTreeData">
            <CFIF CurGroup1 is not State>
                  <CFTREEITEM value="#State#" parent="0" display="#State#" img="Folder" expand="no">
                  <CFSET CurGroup1 = State>
                  <CFSET CurGroup2 = ''>
            </CFIF>
            <CFIF CurGroup2 is not City>
                  <CFTREEITEM value="#City#" parent="#State#" display="#City#" img="Folder" expand="no">
                  <CFSET CurGroup2 = City>
                  <CFSET CurGroup3 = ''>
            </CFIF>
            <CFTREEITEM value="#Name#" parent="#City#" display="#Name#" img="Document" expand="no">
      </CFLOOP>
</CFTREE>
<P>
<INPUT type="Submit" value="Display">
</CFFORM>

</BODY></HTML>

=====================================

4. Body Frame
=====================================

<html>
<head>
      <title>Untitled</title>
</head>
<body>
Here is where the information is going to go.
</body>
</html>

=====================================

5. New Frame for Body
=====================================
<html>
<head>
      <title>Untitled</title>
</head>
<body>
<cfoutput>
<b>#TREE.NODE#</b><br>
</cfoutput>
</body>
</html>

=====================================

Nathan Stanford
Mr ColdFusion
=====================================
ColdFusion Tips Plus
FREE e-ZINE
http://www.nsnd.com/cftips
or subscribe by sending a blank email to
subscribe-cftips@nsnd.com

0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 26

Author Comment

by:EddieShipman
ID: 2552503
Where does the new frame come in???
0
 
LVL 5

Expert Comment

by:nathans
ID: 2553286
load each of these files and test it out. If you can't I will do it on my server.

when they select the final item and click on submit.  then it goes over to the new frame.

However I think I could make it where when you select it it does the submit.
0
 
LVL 26

Author Comment

by:EddieShipman
ID: 2554557
I was unable to get the frame code sent
to me but here is the tree code:
The file CFFAQ_Template is the file that
has the frames in in similar to your frames page. The body frame is called _MAIN.

<html>
<head>
      <title>eMDs FAQ</title>
</head>
  <body>  
    <CFFORM ACTION="CFFAQ_Template.CFM" METHOD="POST" NAME="FAQs" TARGET="_Main">
      <CFTREE NAME="FAQTREE" HIGHLIGHTHREF="YES" HEIGHT="585" WIDTH="275" HSCROLL="NO" VSCROLL="NO">
        <CFTREEITEM VALUE="eMDs FAQ" IMG="FOLDER" EXPAND="YES" TARGET="_Main">
        <CFTREEITEM VALUE="Sales" PARENT="eMDs FAQ" HREF="sales.htm" TARGET="_Main">
          <CFTREEITEM VALUE="Software" PARENT="Sales" IMG="DOCUMENT" HREF="salessoftware.htm" TARGET="_Main">
          <CFTREEITEM VALUE="Hardware" PARENT="Sales" IMG="DOCUMENT" HREF="saleshardware.htm" TARGET="_Main">
        <CFTREEITEM VALUE="Technical" PARENT="eMDs FAQ" HREF="technical.htm" TARGET="_Main">
          <CFTREEITEM VALUE="Network" PARENT="Technical" IMG="DOCUMENT" HREF="technicalnetwork.htm" TARGET="_Main">
          <CFTREEITEM VALUE="Hardware" PARENT="Technical" IMG="FOLDER" HREF="technicalhardware.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Specifications" PARENT="Hardware" IMG="DOCUMENT" HREF="technicalhardwarespecs.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Installation" PARENT="Hardware" IMG="DOCUMENT" HREF="technicalhardwareinstall.htm" TARGET="_Main">
        <CFTREEITEM VALUE="Implementation" PARENT="eMDs FAQ" IMG="FOLDER" HREF="implementation.htm" TARGET="_Main">
          <CFTREEITEM VALUE="Training" PARENT="Implementation" IMG="DOCUMENT" HREF="implementationtrain.htm" TARGET="_Main">
          <CFTREEITEM VALUE="Support" PARENT="Implementation" IMG="DOCUMENT" HREF="implementationsupport.htm" TARGET="_Main">
        <CFTREEITEM VALUE="Applications" PARENT="eMDs FAQ" IMG="FOLDER" TARGET="_Main">
          <CFTREEITEM VALUE="topsChart" PARENT="Applications" IMG="FOLDER" HREF="applicationChartBeg.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Beginning With topsChart" PARENT="topsChart" IMG="FOLDER" HREF="applicationChartBeg.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Entering New Patients" PARENT="Beginning With topsChart" IMG="DOCUMENT" HREF="applicationChartEnter.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Opening Charts & Notes" PARENT="Beginning With topsChart" IMG="DOCUMENT" HREF="applicationChartOpen.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Messages" PARENT="Beginning With topsChart" IMG="DOCUMENT" HREF="applicationChartMessages.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Creating SOAP Notes" PARENT="topsChart" IMG="FOLDER" TARGET="_Main">
              <CFTREEITEM VALUE="General Template Information" PARENT="Creating SOAP Notes" IMG="DOCUMENT" HREF="applicationChartGenTemplate.htm" TARGET="_Main">
              <CFTREEITEM VALUE="Subjective" PARENT="Creating SOAP Notes" IMG="DOCUMENT" HREF="applicationChartSOAP-S.htm" TARGET="_Main">
              <CFTREEITEM VALUE="Objective" PARENT="Creating SOAP Notes" IMG="DOCUMENT" HREF="applicationChartSOAP-O.htm" TARGET="_Main">
              <CFTREEITEM VALUE="Assessment" PARENT="Creating SOAP Notes" IMG="DOCUMENT" HREF="applicationChartSOAP-A.htm" TARGET="_Main">
              <CFTREEITEM VALUE="Plan" PARENT="Creating SOAP Notes" IMG="DOCUMENT" HREF="applicationChartSOAP-P.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Using ICD-9 Search" PARENT="topsChart" IMG="DOCUMENT" HREF="applicationChartICD-9.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Writing Prescriptions" PARENT="topsChart" IMG="DOCUMENT" HREF="applicationChartRx.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Health Summary" PARENT="topsChart" IMG="DOCUMENT" HREF="applicationChartHealth.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Chart View Functions" PARENT="topsChart" IMG="DOCUMENT" HREF="applicationChartView.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Installation" PARENT="topsChart" IMG="DOCUMENT" HREF="applicationChartInstallation.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Miscellaneous" PARENT="topsChart" IMG="DOCUMENT" HREF="applicationChartMisc.htm" TARGET="_Main">
          <CFTREEITEM VALUE="topsBill" PARENT="Applications" IMG="FOLDER" TARGET="_Main">
            <CFTREEITEM VALUE="Installation" PARENT="topsBill" IMG="DOCUMENT" HREF="applicationBillInstall.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Demographics" PARENT="topsBill" IMG="DOCUMENT" HREF="applicationBillDemographics.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Posting" PARENT="topsBill" IMG="DOCUMENT" HREF="applicationBillPost.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Claims" PARENT="topsBill" IMG="DOCUMENT" HREF="applicationBillClaim.htm" TARGET="_Main">
            <CFTREEITEM VALUE="Reports" PARENT="topsBill" IMG="DOCUMENT" HREF="applicationBillReport.htm" TARGET="_Main">
<!---            
            <CFTREEITEM VALUE="Reference" PARENT="topsBill" IMG="DOCUMENT" HREF="applicationChartMisc.htm">
            <CFTREEITEM VALUE="Set Up" PARENT="topsBill" IMG="DOCUMENT" HREF="applicationChartMisc.htm">
            <CFTREEITEM VALUE="Miscellaneous" PARENT="topsBill" IMG="DOCUMENT" HREF="applicationChartMisc.htm">
           
 --->          <CFTREEITEM VALUE="topsSchedule" PARENT="Applications" IMG="DOCUMENT" HREF="applicationSchedule.htm" TARGET="_Main">
          <CFTREEITEM VALUE="topsSearch ICD-9" PARENT="Applications" IMG="DOCUMENT" HREF="applicationSearch.htm" TARGET="_Main">
      </CFTREE>
    </CFFORM>
  </body>
</html>
0
 
LVL 5

Expert Comment

by:nathans
ID: 2554766
TARGET="BODY"
0
 
LVL 5

Expert Comment

by:nathans
ID: 2554775
What is the NAME of the Frame you are wanting to replace OR are you wanting to replace the Whole Page?
0
 
LVL 26

Author Comment

by:EddieShipman
ID: 2555091
I want the links in the tree to display n the _MAIN frame. But, like I said, in
NS it either breaks out of the frame and displays in the entire window or opens a new window depending upon the target.

I tried the source you presented with my CFTree.cfm as the src for the second frame and the document is coming up EMPTY! No frames, nothing!!!



0
 
LVL 5

Expert Comment

by:nathans
ID: 2555509
If the name of the FRAME is MAIN then you need to try target="MAIN"

I'm not sure if MAIN is a reserved word or not but if that does not work try...

Changing the Name of the Frame to
MAIN1

then

target="MAIN1"


NO '_' in front of it.
0
 
LVL 5

Expert Comment

by:nathans
ID: 2555588
Oh yes by the way it is CASE SENSITIVE as well.

I have tested this again and it works...

0
 
LVL 26

Author Comment

by:EddieShipman
ID: 2555741
I built another frame unit with the frames wizard and it worked in NS and IE.

The code looks EXACTLY the same as my other code, word for word, exact punctuation too.

Don't know why it wouldn't work but it does now no matter what I call the main frame.

Thanks...
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how can I backup my incomplete website from hostgator? 3 73
System Analysis 5 67
Moving web servers into a DMZ? 3 78
Adding multiple JVM environments to RedHat 6 7 69
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

733 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