•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ColdFusion section within the Web Development category of DaniWeb, a massive community of 428,581 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,688 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ColdFusion advertiser: Programming Forums
Views: 1821 | Replies: 3
![]() |
•
•
Join Date: Mar 2007
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
Hello anybody who takes the time to read this!
I am not new to CFM but have not hit it to deep as of this point. Here is my problem and I hope I can explain this well enough.
I have a page that will be driven left to right based on a parent/child relationship. The problem I have is figuring out how to loop indefinitely since my record set could contain a parent with a single child with no children or it could go 100 levels deep. So in reality, I basically want to make a tree like view that starts with 2 parents (USA and CANADA). Now "I" know that those both have children in my data structure (The query returns ID,ParentID and NAME. When I click on USA I need to see all 50 states in a new table cell to the right of it. Then when I click on a state, I need to see all of it's counties... then when I click on a county I need to see all of it's children which could be cities, agencies, city governmets etc...
All of these clicks I speak of will be post backs and no javascript or hidden divs since I need to make this little app accessible for the blind.
Also, if I have USA exapanded m-levels deep I need to be able to close it at any of the nodes. I also need to be able to click on CANADA and keep all the USA nodes open. So I need to figure out a way to track what's open and how it's connected etc so that I can export out the diagram in a PDF.
PLEASE HELP!!!!
I am not new to CFM but have not hit it to deep as of this point. Here is my problem and I hope I can explain this well enough.
I have a page that will be driven left to right based on a parent/child relationship. The problem I have is figuring out how to loop indefinitely since my record set could contain a parent with a single child with no children or it could go 100 levels deep. So in reality, I basically want to make a tree like view that starts with 2 parents (USA and CANADA). Now "I" know that those both have children in my data structure (The query returns ID,ParentID and NAME. When I click on USA I need to see all 50 states in a new table cell to the right of it. Then when I click on a state, I need to see all of it's counties... then when I click on a county I need to see all of it's children which could be cities, agencies, city governmets etc...
All of these clicks I speak of will be post backs and no javascript or hidden divs since I need to make this little app accessible for the blind.
Also, if I have USA exapanded m-levels deep I need to be able to close it at any of the nodes. I also need to be able to click on CANADA and keep all the USA nodes open. So I need to figure out a way to track what's open and how it's connected etc so that I can export out the diagram in a PDF.
PLEASE HELP!!!!
•
•
Join Date: Mar 2007
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
I have a mock image if that helps.
http://www.stungi.com/mock.jpg
http://www.stungi.com/mock.jpg
•
•
Join Date: Jan 2007
Location: Austin, TX
Posts: 30
Reputation:
Rep Power: 2
Solved Threads: 0
Goal is something like:
World > United States > North East > New York >list of cities
Hidden form fields for:
Country
Region
State
City
Your CFM page checks if the hidden form fields have a value, if they do, it will add them to whatever query you have to pull the information. The result of that query is what you display on the page. If you write the query so that the same column can return either a state/region/city depending on your inputs then you should be good to go.
It seems like a lot of it relies on how you have this information structured in your database.
Good luck,
Dan
World > United States > North East > New York >list of cities
Hidden form fields for:
Country
Region
State
City
Your CFM page checks if the hidden form fields have a value, if they do, it will add them to whatever query you have to pull the information. The result of that query is what you display on the page. If you write the query so that the same column can return either a state/region/city depending on your inputs then you should be good to go.
It seems like a lot of it relies on how you have this information structured in your database.
Good luck,
Dan
Dan Moore
www.danmoore.org
www.danmoore.org
![]() |
•
•
•
•
•
•
•
•
DaniWeb ColdFusion Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- 2-tier 3-tier (IT Careers and Business)
- Data Tier help (VB.NET)
- Start-up is Looping, UGH! (Windows NT / 2000 / XP / 2003)
- Winsock and looping issues unsure how to resolve (Visual Basic 4 / 5 / 6)
- Need some help with putting a looping into a converter program. (C)
Other Threads in the ColdFusion Forum
- Previous Thread: finding duration worked between time ranges from login and logout time
- Next Thread: Run exe file using Coldfusion


Linear Mode