Skip navigation
FlintHosts.co.uk
Currently Being Moderated

cfselect bind not working

Jun 15, 2013 9:02 AM

Tags: #cfform #cfinclude #cfselect

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?

 
Replies
  • Currently Being Moderated
    Jun 17, 2013 9:42 AM   in reply to FlintHosts.co.uk

    I would suggest applying the latest updates on ColdFusion.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 17, 2013 2:53 PM   in reply to FlintHosts.co.uk

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 13, 2013 1:17 PM   in reply to p.sim

    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?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points