0 Replies Latest reply on Oct 9, 2013 6:29 PM by LisaN

    Cfdiv and bind

    LisaN Level 1

          Hi,

        

          What i am try to do is when i start enter the name into text box, i want the result is auto refresh or filter  into the cfdiv tag.  My code did not work, can some one please give me a hand?

       

      Thanks

        

          <cffunction name="getArtDescription" access="remote" returnType="query">

            <cfargument name="name" type="any" required="false">

          

              <cfset var data="">

              <cfset var result="">

       

              <!--- Get data --->

              <cfquery name="data" datasource="#dsn#">

                select * from [dbo].[Arts]

              WHERE nam LIKE '#ARGUMENTS.name#%'

              </cfquery>

        

            <cfif data.RecordCount IS 1>

              <cfsavecontent variable="result">

                      <cfoutput>

                          #data.name#

                           #data.desc#

                      </cfoutput>

                  </cfsavecontent>

              </cfif>

            

                                      <cfreturn result>

         

          </cffunction>

        

      <cfform action="" method="post" name="artForm">

                      <cfinput type="text" name="name">

      </cfform>

       

      <cfdiv id="name" name="name"  bind="cfc:cfc.Art.getArtDescription({name@KeyUp})" bindOnLoad="false"/>