5 Replies Latest reply on Dec 11, 2013 3:00 PM by Ken R Caldwell

    bind: Bind failed, element not found




      i've test a simple search with cfgrid but don't know why when i dump the arguments from my cfc and it shows null instead of empty string.  

      To testing, i added cfdebug at the end and see some error:

      Element not found: ANo

      'gridRender' is undefined.  


      Please look at my code below and let me know what did i have wrong.  -Thanks



      <cfform action="process.cfm" method="post">
      <cfinput type="text" name="ANo" id="ANo" value="">
      <input class="button" type="submit" name="submit" value="Search" />


      <cfparam name="variables.row_per_page_default" default="15">
      <cfparam name="variables.row_per_page_list" default="15,30,50,75,100">
      <cfparam name="form.ANo" default="" />

      <cfform name="gridform" >
             title="Search Result"
          selectMode=" Single"
            stripeRowColor ="silver"
          stripeRows="yes"  width="900"
          bind="cfc:cfc.searchA.SearchA({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsor tdirection},
               <cfgridcolumn dataalign="center" width="100" name="aNo_var" header="A Number" href="index.cfm?action=editCR"  hrefkey="id" target="_blank" />


          <cfset ajaxOnLoad("gridRender")>
          <cfcomponent displayname="search" output="no" hint="search a number">
           <cffunction name="SearchA" returntype="struct" access="remote">
              <cfargument name="page" required="true" />
              <cfargument name="pageSize" required="true" />
              <cfargument name="gridsortcolumn" required="true" />
              <cfargument name="gridsortdirection" required="true" />
             <cfargument name="ANo" required="yes" type="any" />
              <cfdump var="#arguments#"><cfabort>
              <cfquery name="qSearchA" datasource="#dsn#">
                select * from mytblb
                where  0=0
              <cfif arguments.ANo neq "">
                ANo_var = <cfqueryparam value="#arguments.ANo#" cfsqltype="cf_sql_varchar" />
              <cfreturn queryconvertforgrid(qSearchA, page, pagesize)>


      i don't see html from cfgrid format, all i see is xml, applet, flash.  I mannulay entery HTML in,  do you know why is HTML is not on the list?