I am working on a project that will show ... if there is a policy make the policy name a hyperlink else just list the policy name. Here is the code:
<cfquery datasource="#ds#" name="getTitle">
SELECT TitleID, TitleDesc
FROM Title
</cfquery>
<table border="0">
<cfloop query="getTitle">
<tr>
<td class="subfour">
<!--- Display the Policy title --->
<cfoutput><b>#TitleDesc#</b></cfoutput></td></tr>
<cfquery datasource="#ds#" name="getTitleBody">
SELECT *
FROM qryGetTitles1
WHERE Ttitle = #getTitle.TitleID#
</cfquery>
<cfoutput query="getTitleBody">
<cfif BodyID eq url.BBody>
<cfset TD = #replace(TitleDesc," ", "%20", "all"#>
<form action="printpolicies.cfm" method="post">
<!--- if the Policy Title is there, display it as a hyperlink to their respective policies --->
<input type="checkbox" name="PrintMe" value="#PolicyID#">
<a href = "BodyPolicyText.cfmTitleDesc=#TD#&PolicyID=#PolicyID#">#TitleDesc#</a></td></tr>
</cfif>
</cfoutput>
The results are:
Academic Dishonesty (this is a hyperlink)
Academic Dishonesty (this one is not a hyperlink)
Advising Requirements
Appeals of Registration or Records Policies
Auditor Status
The "Academic Dishonesty" title that is not a hyperlink should not show up. What might I be doing wrong?
Thanks in advance for all your help,
elkay
<cfquery datasource="#ds#" name="getTitle">
SELECT TitleID, TitleDesc
FROM Title
</cfquery>
<table border="0">
<cfloop query="getTitle">
<tr>
<td class="subfour">
<!--- Display the Policy title --->
<cfoutput><b>#TitleDesc#</b></cfoutput></td></tr>
<cfquery datasource="#ds#" name="getTitleBody">
SELECT *
FROM qryGetTitles1
WHERE Ttitle = #getTitle.TitleID#
</cfquery>
<cfoutput query="getTitleBody">
<cfif BodyID eq url.BBody>
<cfset TD = #replace(TitleDesc," ", "%20", "all"#>
<form action="printpolicies.cfm" method="post">
<!--- if the Policy Title is there, display it as a hyperlink to their respective policies --->
<input type="checkbox" name="PrintMe" value="#PolicyID#">
<a href = "BodyPolicyText.cfmTitleDesc=#TD#&PolicyID=#PolicyID#">#TitleDesc#</a></td></tr>
</cfif>
</cfoutput>
The results are:
Academic Dishonesty (this is a hyperlink)
Academic Dishonesty (this one is not a hyperlink)
Advising Requirements
Appeals of Registration or Records Policies
Auditor Status
The "Academic Dishonesty" title that is not a hyperlink should not show up. What might I be doing wrong?
Thanks in advance for all your help,
elkay