I have a cfc which have two function, function one returns a query
(more than one rows) which I am using to populate the cfselect.
Then I have some form fields, once the cfselect dropdown have a
selected value, I need to call the other function and pass the value
of the cfselected ( which will return only one row ) and need to
display that in different text boxes.
I am using the codes below. The error I am getting is
error:bind: Bind failed, element not found: proj_id
here are the codes.
CFC
------
<cffunction name="getProjects" access="remote" returntype="query">
<cfargument name="userid" required="no" default="#session.userid#">
<cfquery name="qryGetProjects" datasource="Bundler_Dev">
SELECT a.*, b.type, c.status
FROM project_master a, project_types b, project_status_types c
WHERE a.pst_id = c.pst_id
AND a.type_id = b.type_id
AND a.user_id = #arguments.userid#
ORDER BY project_name
</cfquery>
<cfreturn qryGetProjects>
</cffunction>
<cffunction name="getSpecificProject" access="remote"
returntype="query">
<cfargument name="proj_id" required="yes">
<cfquery name="qryGetProjects" datasource="Bundler_Dev">
SELECT a.*, b.type, c.status
FROM project_master a, project_types b, project_status_types c
WHERE a.pst_id = c.pst_id
AND a.type_id = b.type_id
AND a.project_id = #arguments.proj_id#
ORDER BY project_name
</cfquery>
<cfreturn qryGetProjects>
</cffunction>
here is the form.
<cfform name="DataForm" action="" method="post">
<cfselect name="proj_id" height="70"
bind="cfc:MyCFCPath.getProjects(#session.userid#)" value="project_id"
display="project_name" bindonload="true" />
and this is the text field where I need to display the value on the
cfc function call
<cfinput type="text" name="title" size="53"
bind="cfc:MyCFCPath.getSpecificProject({proj_id})" bindonload="false">
Thanks,
>You've lost me. Are you syaing you want the cfinput to bind to the
>select? Did you try bind="{proj_id}" in the text input?
>
>
>>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion is delivering applications solutions at at top companies
around the world in government. Find out how and where now
http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287691
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4