Hope someone can help with this.

The query is:

        <cffunction name="GetTitleList" 
                                access="public" 
                                returntype="query" 
                                hint="List all reviews">
    <cfargument name="campus"
                        type="string">
        <cfquery name="qGetTitleList" datasource="bookreviews">
    SELECT m.moodId, m.mood,
           g.genreId, g.genre,
           c.campusId, c.campusName, c.iBistro, c.campusLowerCase,
           r.reviewpk,r.review, r.ratingId, r.entryDate,
           t.title, a.AuthorFirst, a.AuthorLast,
           s.firstName, s.lastName, s.FirstNameDis,s.StudentId,
           st.staffFirst, st.staffLast, st.salutation
    FROM  (((((((Review r INNER JOIN Genre g ON r.genreId = g.genreId)
          INNER JOIN Campus c ON r.campusId = c.campusId)
          INNER JOIN Mood m ON r.moodId = m.moodId)
          INNER JOIN Title t ON r.reviewId = t.titlePk)
          INNER JOIN Author

 a ON t.authId = a.AuthPk)
          LEFT OUTER JOIN Student s ON r.studentId = s.studentId)
          LEFT OUTER JOIN Staff st ON r.studentId = st.staffId)
    WHERE r.approved = True
    AND r.Display = <cfqueryparam cfsqltype="cf_sql_integer" value="1">
    AND c.LibType = <cfqueryparam cfsqltype="cf_sql_varchar" 
value="#SESSION.libType#">
    AND r.CampusId = <cfqueryparam cfsqltype="cf_sql_varchar" 
value="#SESSION.libid#">
    ORDER BY r.entryDate DESC
    </cfquery>
          <cfreturn qGetTitleList>
        </cffunction>

The javascript is:

<script language=javascript type='text/javascript'>

function showdiv() {
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('hideShow').style.visibility = 'visible';
}
else {
if (document.layers) { // Netscape 4
document.hideShow.visibility = 'visible';
}
else { // IE 4
document.all.hideShow.style.visibility = 'visible';
}
}
}

function hidediv() {
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('hideShow').style.visibility = 'hidden';
}
else {
if (document.layers) { // Netscape 4
document.hideShow.visibility = 'hidden';
}
else { // IE 4
document.all.hideShow.style.visibility = 'hidden';
}
}
}


</script>

The output is:

<cfloop query="qGetTitleList" startrow="#URL.startRow#" endrow="#endRow#">
<cfoutput>
                <tr>
                <td width="70%" align="left">
<span class="titlehd">Author: </span>
<a href="http://library.neisd.net/>#qGetTitleList.authorLast#, 
#qGetTitleList.authorFirst#</a><br>
<span class="titlehd">Title: </span>
<a href="http://library.neisd.net/>#qGetTitleList.Title#</a><br>
<span class="titlehd">Mood: </span><a 
href="mood.cfm?pMoodId=#qGetTitleList.MoodId#" 
class="tlink">#qGetTitleList.Mood#</a> <br>
<span class="titlehd">Genre:</span><a 
href="genre.cfm?pGenreId=#qGetTitleList.GenreId#" class="tlink"> 
#qGetTitleList.Genre#</a><br />
<cfif #qGetTitleList.firstNameDis# EQ 2><span class="titlehd">Reviewed 
by:</span> <span class="cap">#LCase(qGetTitleList.FirstName)#</span><cfelseif 
#qGetTitleList.firstNameDis# EQ 1><span class="titlehd">Reviewed by:</span> 
<span class="cap">#LCase(qGetTitleList.FirstName)# 
#LCase(qGetTitleList.lastName)#</span><cfelseif #qGetTitleList.staffFirst# IS 
NOT ""><span class="titlehd">Reviewed by:</span> #qGetTitleList.Salutation# 
#qGetTitleList.staffFirst# #qGetTitleList.staffLast#<cfelse><span 
class="titlehd">Review by:</span> Anonymous</cfif> 
                </td>
                </tr>

                <tr>
                <td class="reviewtd">
                        <span class="titlehd">Review: 
</span>#qGetTitleList.Review#<br />
                        <!--- OPENS COMMENT WINDOW --->


<a href="javascript:showdiv('#reviewPk#')">show div</a> 
<div id="#reviewPk#">
<a href="javascript:hidediv('#reviewpk#')">hide div</a>
My content #reviewpk#
</div>

            <hr>        
                </td>
                </tr>
        </cfoutput>
</cfloop>

The show/hide javascript does not work under each looped output.

Any suggestions?

Thanks in advance,

John 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4493
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to