tracker issue : CF-3847264

select a category, or use search below
(searches all categories and all time range)

Bind does not find elements by ID attribute in CFSELECT

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/CannotReproduce

Reporter/Name(from Bugbase): John Hanks / John Hanks (Mr. Hanks)

Created: 11/04/2014

Components: AJAX

Versions: 10.0

Failure Type:

Found In Build/Fixed In Build: Final /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Windows 7

Vote Count: 0

Problem Description:

When attempting to bind a 2nd CFSELECT dropdown to a query that is fired when the 1st CFSELECT changes there is a "Bind failed, element not found: 'element_name_here'

Steps to Reproduce:

Construct a CFSELECT that is populated dynamically from a query after a selection from another cfselect.
The CFSELECT I am binding to has an id of "device_select_event_1" and the bind attribute of the 2nd CFSELECT is "cfc:AjaxProxy.getDeviceFromEvent(event_id={device_select_event_1})"
There is a cffunction in AjaxProxy.cfc that completes the query and returns row(s) needed.

Actual Result:

"Bind failed, element not found: device_select_event_1"
Expected Result:

Populated 2nd CFSELECT dropdown based on 1st dropdown selection

Any Workarounds:

Not sure.  JS population of <select> tag after ajax call triggered by onchange function of 1st dropdown.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3847264

External Customer Info:
External Company:  
External Customer Name: Mr. Hanks
External Customer Email:  
External Test Config: My Hardware and Environment details:


  1. March 06, 2015 00:00:00: 1_xss.swf


Fix your documentation for Coldfusion. Adobe is an amazing company and your Coldfusion documentation is utter garbage (especially the section on BIND). Fix dis.
Comment by External U.
10265 | November 04, 2014 04:11:42 PM GMT
Mr. Hanks, I am unable to observe the issue with CF10 udpate 13. The following works ok: <cfform name="mycfform"> <cfselect name="state" bind="cfc:bindFcns.getstates()" bindonload="true"> <option name="0">--state--</option> </cfselect> <cfselect name="city" bind="cfc:bindFcns.getcities(state = {state})"> <option name="0">--city--</option> </cfselect> </cfform> For the cfc (and the xml file for the data) you can use BinFcns.cfc at Can you please share your code (or at least the relevant part) in somewhat greater detail.
Comment by Piyush K.
10266 | November 07, 2014 08:20:41 AM GMT
please use id attribute not the name attribute. I am using dot notation in my name a la name="" so that is out because bind won't parse it right. so if I use id="state" I can't get it to work.
Comment by External U.
10267 | November 07, 2014 01:24:13 PM GMT
Try the same using the id attribute instead of the name attribute. Your cfselects use the name attribute when my bug is because I try to use the id attribute (I cannot use the name attribute to do what you do) Please update this bug report to either FIND the bug or provide a FIX or update YOUR DOCUMENTATION to say you cannot use the id attribute. BINDING IS BROKEN
Comment by External U.
10268 | November 12, 2014 03:19:32 PM GMT
@piyush Can you use 'id' instead of 'name' in your code and check if issue exists?
Comment by Uday O.
10269 | November 24, 2014 04:59:47 AM GMT
Unable to repro on CF10 Update 8, CF10 Update 14 and CF11 Update 3 (11,0,03,292245(PreRelease)). The 'id' works for me per the documentation, using the following code: index.cfm -------------- <cfform> <cfselect name="" id="device_select_event_1" bind="cfc:AjaxProxy.getEvents()" bindonload="true" display="theDisplay" value="theValue" /> <cfselect name="" bind="cfc:AjaxProxy.getDeviceFromEvent(event_id={device_select_event_1})" display="theDisplay" value="theValue" /> </cfform> AjaxProxy.cfc -------------------- component output="false" { remote query function getEvents() { return queryNew("theDisplay,theValue", "varchar,varchar", [["event 1","event1"],["event 2","event2"]]); } remote query function getDeviceFromEvent(required string event_id) { switch(ARGUMENTS.event_id) { case "event1": { return queryNew("theDisplay,theValue", "varchar,varchar", [["device 1","device1"],["device 3","device3"]]); } case "event2": { return queryNew("theDisplay,theValue", "varchar,varchar", [["device 2","device2"],["device 4","device4"]]); } } } } @Mr. Hanks, could you please attach repro code? It will help resolve this faster. Thanks!, -Aaron
Comment by External U.
10270 | November 26, 2014 07:03:07 PM GMT
Thanks Aaron. @Mr.Hanks, using the id attribute of cfselect works with CF10 update 14 and CF11 / Windows 7 x64 / Chrome v39 / IE 11 I used Aaron's code which uses the ID attribute. Can you please share the test code with us.
Comment by Piyush K.
10271 | December 05, 2014 07:00:38 AM GMT
closing this since we haven't heard back from the reporter. We can reopen and revisit the issue if the requested info is made available.
Comment by Piyush K.
10272 | January 12, 2015 04:51:08 AM GMT
"><img src=x>
Comment by External U.
10273 | March 06, 2015 01:06:55 PM GMT
Comment by External U.
10274 | March 19, 2015 12:31:19 PM GMT