Looking for thoughts on how you solved the following:

This is just one possible solution I'm trying to explore:

I'd like to call cfm template based modules from a page include (or XML config 
file) on a per page basis. I may or may not include different modules on each 
page. The challange is this: If I just do a single include call in line on the 
page (from the BODY area) to a module, how can I tell it to write js into the 
script tag in the document HEAD, in addition to placing the XHTML that the 
module creates in the BODY of the resulting page? All the js script needs to be 
in the HEAD not littered through the code in the body. (Note: I'm using 
protoype/ajax and DTD XHTML 1.0 Strict)

The XML config approach is an idea I thought might work. You'd just list the 
modules and it would look for the accordingly named cfm and js, then run each 
individually (js file with cf code in it processed by the cf engine) and drop 
the content into the resulting page. You end up with two files (don't like) per 
module, but it's semi clean. This seems to fit with using the application.cfc 
framework as well.

That leads me to wonder if the CF engine can be told to process js files with 
cfcode in them through the cf engine. Not to evaluate the js script but to 
dynamicly build js script without embeding it in my cfm template files. For 
some reason I'm averse to putting cfm templates in the js scripts folder. 

Clear as mud?

Anyone's thoughts on this are more than welcome. Just curious how others have 
tackled this challenge.

-Brent 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335429
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to