kpjj31
asked on
populate select menu with array from another select menu
I need to learn how to populate one select menu from the information from another. I have a select menu that is populated form a ColdFusion component using CFINVOKE. The data that is being return has nested arrays that go with the value in the select menu. I need to populate a second select menu with the array of the selected item form the first select menu. I have a attached word doc that show what I am doing.
example.docx
example.docx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Just noticed a typo in the CFC example. The code will work as is, but in the interest of best practices, the variables in these 2 lines:
<cfreturn regionQuery />
....
<cfreturn areaQuery/>
... should be replaced to include the variable scope, ie LOCAL:
<cfreturn Local.regionQuery />
....
<cfreturn Local.areaQuery/>
<cfreturn regionQuery />
....
<cfreturn areaQuery/>
... should be replaced to include the variable scope, ie LOCAL:
<cfreturn Local.regionQuery />
....
<cfreturn Local.areaQuery/>
maybe this is what you are looking for
This one is 'index.cfm'
Open in new window
and this one is the .cfc, 'BinFcns.cfc'
Open in new window
<cfselect name="DropDown2" bind="cfc:cfcname.Method({