HOME | FERGUSON Digital Blog

Line 803

ColdFusion Add comments

The browser throws an error durring execution of a CFC page: "Exception thrown and not caught" the offending page is "cfajax.js" in the folders "CFIDE\scripts\ajax\package", specifically line 803. Careful investigation leads you to an offending HTML comment that lands into the CFC thanks to an Application CFM inclusion.ᅠ The easy route might be to rid the file of all comments, but if the code isn't just for yourself and you must have those comments in place here is a workaround for you.

Simply surround each set of comments with a conditional statement to determine the file extension of the current file.ᅠ If the condition tests the file name and determines that it isn't a CFC, then the comments are included.

Example:

<cfif Right(CGI.SCRIPT_NAME, 4) NEQ ".cfc">
   <!-- comment -->
</cfif>

If you find this post useful please leave a comment and let me know how you used the information.

0 responses to “Line 803”

Leave a Reply




© Copyright 1997-2024, All Rights Reserved Coldfusion and MS SQL2008
Powered by Mango Blog.   Design by FERGUSON Digital
o:Event name="beforeHtmlBodyEnd" />