Skip to main content
Participant
October 15, 2010
Question

Completely stumped on a bind issue

  • October 15, 2010
  • 2 replies
  • 1163 views

Here's the code (Field names changed to protect the innocent):

         Field Name:
                <cfinput type="text" name="FieldName" id="FieldLookup" autosuggest="#ValueList(queryOne.queryValue)#" autosuggestminlength="1">
         Field Two:
                <cfselect name="FieldTwo" bind="cfc:cfc.MyCFC.function({FieldLookup@change})" display="ResultField" value="OtherResultField">
                    <option value="">Select Below</option>
                </cfselect>

The form is in root/siteroot/forms/ and the cfc is in root/siteroot/forms/cfc/

Now here's the issue.  On loading the page, the CFC is found just fine, I know this because if I change the path or name it hard errors.  When it tries to run the bind, however, I get "Error invoking CFC /MyCFC.cfc : Not Found [Enable debugging by adding 'cfdebug' to your URL parameters to see more information]"

I ran it through firebug, and it is trying to call root/MyCFC.cfc.  So I changed it from a relative path to a direct one.  It still ignores everything but the CFC name and tries to call it from the root directory.  The root directory runs a completely different website, so I can't just throw the CFC there and call it a day.  I've searched for hours and found a handful of people with what sounds like the same issue, but not a single solution.

Can anyone tell me what the hell is going on with this call?

    This topic has been closed for replies.

    2 replies

    Miguel-F
    Inspiring
    October 18, 2010

    Is a ColdFusion mapping getting in your way?  Or perhaps having a ColdFusion mapping to your cfc might help.

    BKBK
    Community Expert
    Community Expert
    October 15, 2010

    Start from Coldfusion's root, for example, bind="cfc:siteroot.forms.cfc.MyCFC.function()" or bind="cfc:root.siteroot.forms.cfc.MyCFC.function()"

    GotentsuAuthor
    Participant
    October 18, 2010

    I tried pathing it all the way to the root, the same thing happens.  The form loads without error, but the bind doesn't work and firebug still shows it trying to call root/myCFC.cfc

    BKBK
    Community Expert
    Community Expert
    October 18, 2010

    Gotentsu wrote:

    I tried pathing it all the way to the root, the same thing happens.  The form loads without error, but the bind doesn't work and firebug still shows it trying to call root/myCFC.cfc

    To which root, your server's or Coldfusion's? Assuming that your Coldfusion root is the siteroot folder, then bind="cfc:forms.cfc.MyCFC.function()" should work.