I'm using Fusebox and Prototype for some AJAX style interfaces. I essentially built my own server-side piece to handle the JSON data.
I use conditional layouts. One full layout for normal web pages, including all the nav, js and css. The other layout is bare bones and returns a JSON object. This object starts life as a CF structure that contains error data and the contents. I also use http status codes to communicate back to the browser. 500 is for an untrapped CF error and 403 is for a security violation. My client side JS captures this and handles is appropriately. My initial layout gets created using the full layout and the AJAX calls get the JSON data. I'm using a URL parameter to make the distinction, but you could easily detect the Prototype identifer in the header. I prefer the URL parameter, as it is much easier for troubleshooting. If I am getting errors I can paste the URL in the browser, minus the parameter, and instantly get the whole layout. This generally will show me the CF error in plain HTML. Examples: index.cfm?event=listContacts --> would return the contact list surrounded by your normal layout index.cfm?event=listContacts&isAjax=1 --> would return the raw contact list as JSON, XML, or what ever. I don't use MachII, so this URL may not be sound, but I think you can see what I'm doing . Terry "Jeff Chastain" <[EMAIL PROTECTED]> wrote on 06/22/2006 07:35:01 PM: > How does a framework, say Mach-II (although I see the same issue with > Model-Glue or FuseBox), work with Ajax? I can see easily how you could make > a call via Ajax to index.cfm?event=listContacts which would return HTML, > JSON, or whatever to rebuild a portion of the page. The question I am > running into is how does the initial interface get built ... in other words > all of the layout, header, navigation, etc.? > > There has got to be something basic here that I am missing, but I am just > not seeing this. > > Thanks > -- Jeff > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244633 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

