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.


Goal is something like:

World > United States > North East > New York >list of cities

Hidden form fields for:

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,

Thanks, this issue has been resolved!!

I wrote a custom tag that is called within itself to deal with the n-level loop. Works slick!

Thanks all who viewed and esp Dan for replying!