Code is not working for a 2nd select box populating based on selection in the first select box
I want to have the first select box display vehicle makes (this part is working) and then have the second select box display related vehicle models based on the model selected in the first select box.
I've researched this and based my code on answers I have found in the forum, however the second select box is not working.
Following is my code:
The CFC:
<cfcomponent output="false">
<cffunction name="getProduct" access="remote" returnType="query">
<cfset var data="" />
<cfquery datasource="xxxxxxx" name="data">
SELECT makeid, make
FROM makesfinal
ORDER by make
</cfquery>
<cfreturn data>
<!--- Convert results to array --->
<cfloop index="i" from="1" to="#data.RecordCount#">
<cfset result[1]=data.makeid>
<cfset result[2]=data.make>
</cfloop>
<!--- And return it --->
<cfreturn data>
</cffunction>
<cffunction name="getSubProduct" access="remote" returnType="query">
<cfargument name="makeid" type="any" required="true">
<cfset var data="" />
<cfquery datasource="xxxxxxxxxx" name="data">
SELECT modelid, model,makeid
FROM modelsfinal
WHERE makeid = '#ARGUMENTS.makeid#'
ORDER BY model
</cfquery>
<cfloop index="i" from="1" to="#data.RecordCount#">
<cfset result[1]=data.modelid>
<cfset result[2]=data.model>
</cfloop>
<cfreturn data>
</cffunction>
</cfcomponent>
The Select Code:
<cfselect
name="Product"
bind="cfc:makemodel2.getProduct()"
style="width:387px;"
size="1"
multiple="No"
required="No"
display="make"
value="makeid"
bindonLoad="True">
</cfselect>
<cfselect
name="Sub Product"
bind="cfc:makemodel2.getSubProduct({makeid})"
style="width:387px;"
size="1"
multiple="No"
required="No"
display="model"
value="Modelid">
</cfselect>
Thanks for your help.
