我正在使用 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,如上面的 cluttip 输出所示。
问题
我想弄清楚如何将记录 ID 传递给 clue_tip.cfm,以便我可以运行查询并加载相应的记录,并用它填充 cluetip?
谢谢。
最佳答案
使用 url 变量。改变这个:
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>
关于jquery - 将参数传递到 cluttip 的(冷融合)内容页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34342924/