Clearly I have not explained the problem well enough, since
the fact that I'm binding to cfcs has nothing to do with the
problem. Here's a simplified version of the relevant code:
<cfselect name="Type" id="Type"
bind="cfc:MyCFC.GetTypes()" bindonload="yes" />
<cfselect name="Manu" id="Manu"
bind="cfc:MyCFC.GetManus({Type})" />
<cfselect name="Model" id="Model"
bind="cfc:MyCFC.GetModels({Type@none},{Manu})" />
When the user selects a Type from the first list, the Manu
list uses it's binding to get the associated manufacturers and then
the Model list uses it's binding to get the models for that type
and manufacturer. It works just fine (has for a long time).
The cfform has a reset button (<input name="Reset"
type="reset" value="Clear Form">), and when you click it to
reset the form, it does just that, setting each cfselect to it's
first option. However, the fact that the Type cfselect got reset to
it's first option does not cause the Manu and then Models cfselects
to refresh from their bindings like they would if the user had
selected the first Type option. That is the problem.
I had hoped that simply following the reset with a js call to
document.myform.Type.onchange(); would initiate the refresh, but
document.myform.Type.onchange turns out to be null, so no go.
I'm aware of an undocumented js function
ColdFusion.Bind.assignValue that I've seen used for refreshing a
cfselect that binds to a js function, but I have not seen any use
of it when binding to a cfc.
Your thoughts?
Thanks,
Russ