Rob Brooks-Bilson
Tech, Photography, Stuff
Tech, Photography, Stuff
April 29, 2004
My team has been in the process of moving/porting a suite of ColdFusion applications to our new data center. The current apps were originally written using CF 2.0, and updated bit by bit through ColdFusion 4.5.1. We're now migrating them to CF MX 6.1 and have decided to adopt Mach-II as our framework.
We're pretty heavy users of Dan Switzer's qForms JavaScript API and have been integrating it nicely within Mach-II. One gotcha we did run into, however, was discovered by the team (Adam Crump, Jim Bambrough, Ray Ragan, and Steve Rittler). It seems if you have debugging enabled for the request scope, qForms does not work. The problem has to do with the page content being stored in the request scope, so when the page executes, it gets output normally within your view, but it also gets output in the debug code. This results in duplicate form fields and duplicate qForms code, which basically breaks functionality. Not the end of the world, but it can mislead you into believing there's an issue with qForms when there really isn't.
4/29/04 6:47 PM
We ran into a similar problem with variable cached html being displayed in the debugging. We corrected the problem by editing the classic.cfm debug template to the output with <xmp> tag to prevent the browser from rendering the html. This prevented the javascript and CSS issues with the having both displayed. Hope this helps.
4/30/04 10:56 AM
Can you tell us which lines were changed?
Classic.cfm can be rather confusing!
4/30/04 1:04 PM
Have seen this problem with both Fusebox and Mach-II. Turning off request scope debugging in the CF administrator will solve most of it. Bummer if you need that information, though.
4/30/04 5:46 PM
For modifing the variables section of the debuging the output starts at line 576 and ends at 641. If you change the <pre> tags to <xmp> tags or use htmlcodeformat() function to escape the html. I perfer the xmp tags as it does not require any work by CF. Be aware that xmp is nolonger in the html standard but is still supported by most browsers