Copy link to clipboard
Copied
I have the following code in a template called test.cfm:-
<cfform name="MoveDomain" method="post">
Accounts:-<cfselect bind="cfc:cfc.accounts.Function_SearchAccounts()" bindonload="true" value="str_AccountNumber" display="str_AccountNumber" name="AccountNumber" />
Package:-<cfselect bind="cfc:cfc.packages.Function_GetPackagesBind({AccountNumber})" bindonload="false" value="int_PackageID" display="str_FriendlyName" name="Package" />
</cfform>
and this code works fine on it's own with the relevant cfcs.
However when I put this page into a framework it doesnt work. Even stripping everything out.
My application.cfm has this in :-
<cfsilent>
<cfapplication name = "appname"
sessionmanagement = "yes"
sessiontimeout = "#createtimespan(0,1,0,0)#"
applicationtimeout = "#createtimespan(1,0,0,0)#"
setdomaincookies = "yes">
<!--- DSN for control panel --->
<cfset request.dsn = "dsnname">
</cfsilent>
<cfsetting showdebugoutput="yes">
<cfinclude template="layouts/lyt_header.cfm">
and the layouts/lyt_header.cfm is blank.
If I leave the lyt_header.cfm file empty then it all works however if I put even just a '1' in that file then the cfselects stop working and no data is displayed - just empty drop downs
Appending cfdebug on the url give me the following error:-
window:global: Uncaught SyntaxError: parseJSON (http://xxxx2/CFIDE/scripts/ajax/package/cfajax.js, line 804)
Any ideas?
Copy link to clipboard
Copied
I would suggest applying the latest updates on ColdFusion.
Copy link to clipboard
Copied
CF is fully patched and up to date - was there a particular patch you have in mind?
Copy link to clipboard
Copied
I think I know what causing the error. For some reason, that "1" was included in the JSON output and caused the error. In CF Admin, there is a setting to debug AJAX. Turn it on and trace it by looking at the output from AJAX.
Enable AJAX Debug Log Window
Allows display of the AJAX debug log window when the cfdebug flag is passed in the URL. If you disable this option, the AJAX debug log window does not display, even if the cfdebug flag is specified.
Copy link to clipboard
Copied
I am having the same issue. If I remove my header file or merely blank it out, all works fine. Problem is that I really need to display the header file. Is there some way to tell JSON to ignore my header file?