我使用cluetip显示记录的附加信息,如下所示:
<td><a id="a_manu_#i#" href="clue_tip.cfm" rel="clue_tip.cfm">#Manufacturer#</a></td>
$("a[id^='a_manu_']").cluetip();
clue_tip.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>
我测试过以确保coldfusion服务器确实加载(和处理)clue_top.cfm,如上面的cluetip输出所示。
问题
我试图弄清楚如何将记录ID传递给clue_tip.cfm,这样我就可以运行查询并加载相应的记录,然后用它填充cluetip?
谢谢。
答案 0 :(得分:4)
使用网址变量。改变这个:
href="clue_tip.cfm"
到此:
href="clue_tip.cfm?somefield=somevalue"
在clue_tip.cfm中,做一下这样的事情:
<cfif structKeyExists(url, "somefield" and url.somefield is not "">
process the variable
<cfelse>
code for this condition
</cfif>