1 Reply Latest reply: May 19, 2010 9:20 AM by ilssac RSS

    Pulling Content with CFToolTip from Database

    kodemonki Community Member

      I'm using an Oracle (8i) database to store rows to display in a table, some of the words need definitions, so I thought I'd use cftooltips.  An example record in the database is: <cftooltip sourcefortooltip="definitions.cfm?t=2">fill rate</cftooltip>

       

      However, when I loop show this record in cfoutput the source code says exactly what the record says, whereas if I hard code the cftooltip directly into the page it's rendered as:

       

      <span id="cf_tooltip_1274284637633">fill rate</span>

       

      Does anyone know how to store a cftooltip tag in a database and have it render correctly?

        • 1. Re: Pulling Content with CFToolTip from Database
          ilssac Community Member

          You are trying to double evaluate the variable.  You are evaluating the variable to get the CFML code from the database, then you want your system to evaluate that code again.

           

          You can do this with some combonation of the evaluate and delayEvaluate [de] functions.  IIRC evaluate(de(databaseVariable)) is the proper nesting.

           

          But often this turns into a sub-optimal solution and reworking ones concetps to make use of something like a custom tag or includes or user defined functions or other features will be better.