将参数传递给Cluetip的(ColdFusion)内容页面

5

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

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

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

enter image description here

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?

谢谢。

1个回答

4

使用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>

我可以设置 somefield=#RecordId#,很不错。非常感谢! - samus

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接