jquery - 将参数传递到 cluttip 的(冷融合)内容页面

标签 jquery html coldfusion cluetip

我正在使用 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,如上面的 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/

相关文章:

javascript - 更改生成的图像分辨率 Fabric.js

javascript - 为什么只显示一个 GET 值

javascript - 如何使用 Quill 格式化文本和嵌入视频?

javascript - 当窗口小于 ~650px 时,Owl Carousel 不居中

javascript - 如何获取数组中列出的所有日期?

javascript - 如何使用 php 和 jquery 将单选按钮值传递给其他程序并将值插入数据库

javascript - 多色输入框

coldfusion - Coldfusion中的var关键字以及使用次数

coldfusion - 如果没有返回数据,检查查询结果

javascript - 幻灯片内容动画