• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfselect bind not working

New Here ,
Jun 15, 2013 Jun 15, 2013

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?

Views

1.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 17, 2013 Jun 17, 2013

Copy link to clipboard

Copied

I would suggest applying the latest updates on ColdFusion.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 17, 2013 Jun 17, 2013

Copy link to clipboard

Copied

CF is fully patched and up to date - was there a particular patch you have in mind?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 17, 2013 Jun 17, 2013

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 13, 2013 Nov 13, 2013

Copy link to clipboard

Copied

LATEST

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation