Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing parameters to a cluetip's (coldfusion) content page

I'm using a cluetip for displaying a record's additional information, like so:

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

I tested to make sure that the coldfusion server does in fact load (and process) clue_top.cfm, as can be seen in the cluetip output above.

Question

I'm trying to figure out how to pass in a record id to clue_tip.cfm so I can run a query and load the corresponding record, and populate the cluetip with it?

Thank you.

like image 532
samus Avatar asked Sep 26 '22 22:09

samus


1 Answers

Use url variables. Change this:

href="clue_tip.cfm" 

to this:

href="clue_tip.cfm?somefield=somevalue" 

In clue_tip.cfm, do something like this:

 <cfif structKeyExists(url, "somefield" and url.somefield is not "">
 process the variable
 <cfelse>
 code for this condition
 </cfif>
like image 120
Dan Bracuk Avatar answered Nov 03 '22 04:11

Dan Bracuk