• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Cfdiv and bind

Guest
Oct 09, 2013 Oct 09, 2013

Copy link to clipboard

Copied

    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"/>

Views

407

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources
Documentation