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>

上記のcluetip出力に見られるように、coldfusionサーバーが実際にclue_top.cfmをロード(および処理)することを確認するためにテストしました。

質問

レコードIDをclue_tip.cfmに渡す方法を見つけようとしているので、クエリを実行して対応するレコードをロードし、手がかりヒントに入力できますか?

ありがとうございました。

4

1 に答える 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>
于 2015-12-17T19:53:50.727 に答える