Hi, all... I've been writing code for every project I've worked on for the last 10+ years. I did that purposefully to make myself work in a manner which would, hopefully, not cause me to rely on known practices because they were familiar and understood, but always strive to discover better ways of coding.
Now, however, I'm trying to combine reusing code I've already written with enhancing the reused code, instead of writing it from scratch each time. On my latest project I decided to take the dive and structure my code of HTML, CF, jQuery, and CSS in away that allows me to create resource libraries that I can build upon and reference from within new projects. I know *not* doing it this way sounds nuts to some of you. But, again, see my first paragraph. There was a method to the madness of this approach. But, now I find myself (after days of trying to understand what I've found on the Internet and in the CF docs to little avail) trying to get a working method for this approach. I started first by putting my initial components for the project *above* the website's root folder. I knew this was going to be problematic. I, of course, immediately got the error, "component cannot be found." Then, I read about "cfincluding" an application.cfc into an application.cfm in the website root folder. For "kicks and giggles", not a real solution, because this approach is fundamentally flawed, I put an application.cfm in the site root folder and used the relative path capability of <cfinclude> to pull in the application.cfc above the site web root and it's settings into the site's directory structure. Knowing that's not a solution, I continued to dig on the Internet. Nothing has clicked. I think there are too many gaps in my understanding to make sense of everything I'm reading. So, I thought I'd just ask the brains that inhabit the world of CF-Talk and ask for a simple explanation of how to go about accessing cfc's above a website root, that allows those cfc's access to the variables set up in application.cfc when it resides inside the site root directory structure. I'm trying to get this to work in the manner that I access virtually every cfc currently, which is through AJAX functionality in jQuery. I can access a mapped path created in application.cfc using AJAX in this manner: url: location.protocol + '//' + location.host + '/common/coldfusion/form-processing/contact.cfc?method=json' However, the "contact.cfc" has to reference variables setup in the application.cfc, which exists inside the website root. Unless I place the application.cfc in the same folder as "contact.cfc", it doesn't work. So, how do I make the variables from application.cfc available to contact.cfc under such a scenario? Does the "extends" functionality of cfc's solve this? Is that what I need to understand and implement or do I need to look into something else? Clues? Breadcrumbs? Thanks for any feedback! Rick -- -------------------------------------------------------------------------------------------------------------------------------------------------- "Ninety percent of the politicians give the other ten percent a bad reputation." Henry Kissinger ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356043 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

