5

我正在使用提示来显示记录的附加信息,如下所示:

<td><a id="a_manu_#i#" href="clue_tip.cfm" rel="clue_tip.cfm">#Manufacturer#</a></td>

$("a[id^='a_manu_']").cluetip();

在此处输入图像描述

线索提示.cfm

<div style=" height:100%; background:#F0F0F0; border-width:thin; border-style:solid; border-color:#00FFB3;">        
    <img class="float-left" src="img/outdoor-sculpture.jpg" alt="" width="121" height="91" />

    <cfoutput>
        <cfset x = 1/>
        <p>#x#</p>

        <cfif x EQ 1>
            <p>This is a full web page with all the trappings. It's just a little short</p> 
        <cfelse>
            <p>F A L S E</p>    
         </cfif>
     </cfoutput>
</div>

我进行了测试以确保冷融合服务器确实加载(并处理)了线索_top.cfm,如上面的线索提示输出所示。

问题

我试图弄清楚如何将记录 id 传递给线索_tip.cfm,以便我可以运行查询并加载相应的记录,并用它填充线索提示?

谢谢你。

4

1 回答 1

4

使用 url 变量。改变这个:

href="clue_tip.cfm" 

对此:

href="clue_tip.cfm?somefield=somevalue" 

在线索_tip.cfm 中,执行以下操作:

 <cfif structKeyExists(url, "somefield" and url.somefield is not "">
 process the variable
 <cfelse>
 code for this condition
 </cfif>
于 2015-12-17T19:53:50.727 回答