parallon
09-12-2006, 05:12 PM
Hello all. I had a list of of employees and their information, that when you selected the row, would take you to the corresponding record to edit. Well, I needed to add an image to the end of each row to perform a different function, so for that reason, I had to make each cell a clickable region, with all being the same except the last one (the image). Well, now it is acting funny. When there is one record, it displays one record, but if I add a second record, it displays that record twice and the original record once, and if a third record, it displays that one three times, second one twice, and original once ... The DB has only one record for each.
Here is the new code (original commented out):
Do While Not rs.EOF
hours = hours + CSng(rs.Fields("Hours"))
cost = cost + CDbl(rs.Fields("TotalCost"))
'sHTML = "<tr VALIGN=TOP onMouseOver=""this.className='cellhilite';window.status='Edit Labour';return true;"" onMouseOut=""this.className='cellnohilite';window.status='Ready';return true;"" onClick=""editLineResource(" & rs.Fields("Counter") & ")"">" & Chr(10) ' * ORIGINAL CODE *
'sHTML = sHTML & " <td>" & inputtype & "</td>" & Chr(10) ' * ORIGINAL CODE *
sHTML = sHTML & " <tr><td onMouseOver=""this.className='cellhilite';window.status='Edit Labour';return true;"" onMouseOut=""this.className='cellnohilite';window.status='Ready';return true;"" onClick=""editLineResource(" & rs.Fields("Counter") & ")"">" & inputtype & "</td>" & Chr(10)
'sHTML = sHTML & " <td align=right>" & FormatDate(rs.Fields("TransDate")) & "</td>" & Chr(10) ' * ORIGINAL CODE *
sHTML = sHTML & " <td align=right onMouseOver=""this.className='cellhilite';window.status='Edit Labour';return true;"" onMouseOut=""this.className='cellnohilite';window.status='Ready';return true;"" onClick=""editLineResource(" & rs.Fields("Counter") & ")"">" & FormatDate(rs.Fields("TransDate")) & "</td>" & Chr(10)
'sHTML = sHTML & " <td>" & emp & "</td>" & Chr(10) ' * ORIGINAL CODE *
sHTML = sHTML & " <td onMouseOver=""this.className='cellhilite';window.status='Edit Labour';return true;"" onMouseOut=""this.className='cellnohilite';window.status='Ready';return true;"" onClick=""editLineResource(" & rs.Fields("Counter") & ")"">" & emp & "</td>" & Chr(10)
'sHTML = sHTML & " <td>" & rs.Fields("Description") & " </td>" & Chr(10) ' * ORIGINAL CODE *
sHTML = sHTML & " <td onMouseOver=""this.className='cellhilite';window.status='Edit Labour';return true;"" onMouseOut=""this.className='cellnohilite';window.status='Ready';return true;"" onClick=""editLineResource(" & rs.Fields("Counter") & ")"">" & rs.Fields("Description") & " </td>" & Chr(10)
'sHTML = sHTML & " <td>" & rs.Fields("Account") & " </td>" & Chr(10) ' * ORIGINAL CODE *
sHTML = sHTML & " <td onMouseOver=""this.className='cellhilite';window.status='Edit Labour';return true;"" onMouseOut=""this.className='cellnohilite';window.status='Ready';return true;"" onClick=""editLineResource(" & rs.Fields("Counter") & ")"">" & rs.Fields("Account") & " </td>" & Chr(10)
'sHTML = sHTML & " <td align=right>" & FormatCurrency(rs.Fields("Rate"), dec) & "</td>" & Chr(10) ' * ORIGINAL CODE *
sHTML = sHTML & " <td align=right onMouseOver=""this.className='cellhilite';window.status='Edit Labour';return true;"" onMouseOut=""this.className='cellnohilite';window.status='Ready';return true;"" onClick=""editLineResource(" & rs.Fields("Counter") & ")"">" & FormatCurrency(rs.Fields("Rate"), dec) & "</td>" & Chr(10)
'sHTML = sHTML & " <td align=right>" & FormatCurrency(rs.Fields("AddCost"), dec) & "</td>" & Chr(10) ' * ORIGINAL CODE *
sHTML = sHTML & " <td align=right onMouseOver=""this.className='cellhilite';window.status='Edit Labour';return true;"" onMouseOut=""this.className='cellnohilite';window.status='Ready';return true;"" onClick=""editLineResource(" & rs.Fields("Counter") & ")"">" & FormatCurrency(rs.Fields("AddCost"), dec) & "</td>" & Chr(10)
'sHTML = sHTML & " <td align=right>" & rs.Fields("Hours") & "</td>" & Chr(10) ' * ORIGINAL CODE *
sHTML = sHTML & " <td align=right onMouseOver=""this.className='cellhilite';window.status='Edit Labour';return true;"" onMouseOut=""this.className='cellnohilite';window.status='Ready';return true;"" onClick=""editLineResource(" & rs.Fields("Counter") & ")"">" & rs.Fields("Hours") & "</td>" & Chr(10)
'sHTML = sHTML & " <td align=right>" & FormatCurrency(rs.Fields("TotalCost"), dec) & "</td></tr>" & Chr(10) ' * ORIGINAL CODE *
sHTML = sHTML & " <td align=right onMouseOver=""this.className='cellhilite';window.status='Edit Labour';return true;"" onMouseOut=""this.className='cellnohilite';window.status='Ready';return true;"" onClick=""editLineResource(" & rs.Fields("Counter") & ")"">" & FormatCurrency(rs.Fields("TotalCost"), dec) & "</td>" & Chr(10)
sHTML = sHTML & " <td align=center><a HREF=""javascript:getSchedule('" & Server.URLEncode(emp) & "')"" tabindex=-1><img SRC=""../images/memo.gif"" border=0 align=top ALT=""Go to Scheduling module""></a></td></tr>" & chr(10) 'Icon to take user to Scheduling Module
Response.Write sHTML
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
'Total
sHTML = "<tr VALIGN=TOP><td colspan=7 align=right>" & msg(6) & "</td>" & Chr(10)
sHTML = sHTML & " <td align=right>" & hours & "</td>" & Chr(10)
sHTML = sHTML & " <td align=right>" & FormatCurrency(cost, dec) & "</td></tr>"
Response.Write sHTML
%>
So, other than writing a script (getSchedule) for the new Icon to redirect to another page, nothing else has changed.
Can anyone understand why this is looping so funny? If anything, you would think that it would repeat each record the same amount of times.
By the way, here is the page output source for that section: (duplicates highlighted in different colors)
<tbody class="blacklabel">
<tr><td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)"><input type=checkbox title=select value=20523 onclick="nopopup=true"></td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">6/1/2006</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">EBYSTRO</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">Edward Bystrom </td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)"> </td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">$0.00</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">$0.00</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">16</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">$0.00</td>
<td align=center><a HREF="javascript:getSchedule('EBYSTRO')" tabindex=-1><img SRC="../images/memo.gif" border=0 align=top ALT="Go to Scheduling module"></a></td></tr>
<tr><td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)"><input type=checkbox title=select value=20523 onclick="nopopup=true"></td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">6/1/2006</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">EBYSTRO</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">Edward Bystrom </td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)"> </td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">$0.00</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">$0.00</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">16</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">$0.00</td>
<td align=center><a HREF="javascript:getSchedule('EBYSTRO')" tabindex=-1><img SRC="../images/memo.gif" border=0 align=top ALT="Go to Scheduling module"></a></td></tr>
<tr><td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)"><input type=checkbox title=select value=22479 onclick="nopopup=true"></td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">9/12/2006</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">MJDALEY</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">Mike Daley </td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)"> </td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">$37.76</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">$0.00</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">5</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">$188.80</td>
<td align=center><a HREF="javascript:getSchedule('MJDALEY')" tabindex=-1><img SRC="../images/memo.gif" border=0 align=top ALT="Go to Scheduling module"></a></td></tr>
<tr><td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)"><input type=checkbox title=select value=20523 onclick="nopopup=true"></td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">6/1/2006</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">EBYSTRO</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">Edward Bystrom </td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)"> </td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">$0.00</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">$0.00</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">16</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">$0.00</td>
<td align=center><a HREF="javascript:getSchedule('EBYSTRO')" tabindex=-1><img SRC="../images/memo.gif" border=0 align=top ALT="Go to Scheduling module"></a></td></tr>
<tr><td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)"><input type=checkbox title=select value=22479 onclick="nopopup=true"></td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">9/12/2006</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">MJDALEY</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">Mike Daley </td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)"> </td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">$37.76</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">$0.00</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">5</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">$188.80</td>
<td align=center><a HREF="javascript:getSchedule('MJDALEY')" tabindex=-1><img SRC="../images/memo.gif" border=0 align=top ALT="Go to Scheduling module"></a></td></tr>
<tr><td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20522)"><input type=checkbox title=select value=20522 onclick="nopopup=true"></td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20522)">6/1/2006</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20522)">MRNISSE</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20522)">Mark Nissen </td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20522)"> </td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20522)">$0.00</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20522)">$0.00</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20522)">16</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20522)">$0.00</td>
<td align=center><a HREF="javascript:getSchedule('MRNISSE')" tabindex=-1><img SRC="../images/memo.gif" border=0 align=top ALT="Go to Scheduling module"></a></td></tr>
<tr VALIGN=TOP><td colspan=7 align=right>Total</td>
<td align=right>37</td>
<td align=right>$188.80</td></tr>
</tbody>
Thanks,
Parallon
Here is the new code (original commented out):
Do While Not rs.EOF
hours = hours + CSng(rs.Fields("Hours"))
cost = cost + CDbl(rs.Fields("TotalCost"))
'sHTML = "<tr VALIGN=TOP onMouseOver=""this.className='cellhilite';window.status='Edit Labour';return true;"" onMouseOut=""this.className='cellnohilite';window.status='Ready';return true;"" onClick=""editLineResource(" & rs.Fields("Counter") & ")"">" & Chr(10) ' * ORIGINAL CODE *
'sHTML = sHTML & " <td>" & inputtype & "</td>" & Chr(10) ' * ORIGINAL CODE *
sHTML = sHTML & " <tr><td onMouseOver=""this.className='cellhilite';window.status='Edit Labour';return true;"" onMouseOut=""this.className='cellnohilite';window.status='Ready';return true;"" onClick=""editLineResource(" & rs.Fields("Counter") & ")"">" & inputtype & "</td>" & Chr(10)
'sHTML = sHTML & " <td align=right>" & FormatDate(rs.Fields("TransDate")) & "</td>" & Chr(10) ' * ORIGINAL CODE *
sHTML = sHTML & " <td align=right onMouseOver=""this.className='cellhilite';window.status='Edit Labour';return true;"" onMouseOut=""this.className='cellnohilite';window.status='Ready';return true;"" onClick=""editLineResource(" & rs.Fields("Counter") & ")"">" & FormatDate(rs.Fields("TransDate")) & "</td>" & Chr(10)
'sHTML = sHTML & " <td>" & emp & "</td>" & Chr(10) ' * ORIGINAL CODE *
sHTML = sHTML & " <td onMouseOver=""this.className='cellhilite';window.status='Edit Labour';return true;"" onMouseOut=""this.className='cellnohilite';window.status='Ready';return true;"" onClick=""editLineResource(" & rs.Fields("Counter") & ")"">" & emp & "</td>" & Chr(10)
'sHTML = sHTML & " <td>" & rs.Fields("Description") & " </td>" & Chr(10) ' * ORIGINAL CODE *
sHTML = sHTML & " <td onMouseOver=""this.className='cellhilite';window.status='Edit Labour';return true;"" onMouseOut=""this.className='cellnohilite';window.status='Ready';return true;"" onClick=""editLineResource(" & rs.Fields("Counter") & ")"">" & rs.Fields("Description") & " </td>" & Chr(10)
'sHTML = sHTML & " <td>" & rs.Fields("Account") & " </td>" & Chr(10) ' * ORIGINAL CODE *
sHTML = sHTML & " <td onMouseOver=""this.className='cellhilite';window.status='Edit Labour';return true;"" onMouseOut=""this.className='cellnohilite';window.status='Ready';return true;"" onClick=""editLineResource(" & rs.Fields("Counter") & ")"">" & rs.Fields("Account") & " </td>" & Chr(10)
'sHTML = sHTML & " <td align=right>" & FormatCurrency(rs.Fields("Rate"), dec) & "</td>" & Chr(10) ' * ORIGINAL CODE *
sHTML = sHTML & " <td align=right onMouseOver=""this.className='cellhilite';window.status='Edit Labour';return true;"" onMouseOut=""this.className='cellnohilite';window.status='Ready';return true;"" onClick=""editLineResource(" & rs.Fields("Counter") & ")"">" & FormatCurrency(rs.Fields("Rate"), dec) & "</td>" & Chr(10)
'sHTML = sHTML & " <td align=right>" & FormatCurrency(rs.Fields("AddCost"), dec) & "</td>" & Chr(10) ' * ORIGINAL CODE *
sHTML = sHTML & " <td align=right onMouseOver=""this.className='cellhilite';window.status='Edit Labour';return true;"" onMouseOut=""this.className='cellnohilite';window.status='Ready';return true;"" onClick=""editLineResource(" & rs.Fields("Counter") & ")"">" & FormatCurrency(rs.Fields("AddCost"), dec) & "</td>" & Chr(10)
'sHTML = sHTML & " <td align=right>" & rs.Fields("Hours") & "</td>" & Chr(10) ' * ORIGINAL CODE *
sHTML = sHTML & " <td align=right onMouseOver=""this.className='cellhilite';window.status='Edit Labour';return true;"" onMouseOut=""this.className='cellnohilite';window.status='Ready';return true;"" onClick=""editLineResource(" & rs.Fields("Counter") & ")"">" & rs.Fields("Hours") & "</td>" & Chr(10)
'sHTML = sHTML & " <td align=right>" & FormatCurrency(rs.Fields("TotalCost"), dec) & "</td></tr>" & Chr(10) ' * ORIGINAL CODE *
sHTML = sHTML & " <td align=right onMouseOver=""this.className='cellhilite';window.status='Edit Labour';return true;"" onMouseOut=""this.className='cellnohilite';window.status='Ready';return true;"" onClick=""editLineResource(" & rs.Fields("Counter") & ")"">" & FormatCurrency(rs.Fields("TotalCost"), dec) & "</td>" & Chr(10)
sHTML = sHTML & " <td align=center><a HREF=""javascript:getSchedule('" & Server.URLEncode(emp) & "')"" tabindex=-1><img SRC=""../images/memo.gif"" border=0 align=top ALT=""Go to Scheduling module""></a></td></tr>" & chr(10) 'Icon to take user to Scheduling Module
Response.Write sHTML
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
'Total
sHTML = "<tr VALIGN=TOP><td colspan=7 align=right>" & msg(6) & "</td>" & Chr(10)
sHTML = sHTML & " <td align=right>" & hours & "</td>" & Chr(10)
sHTML = sHTML & " <td align=right>" & FormatCurrency(cost, dec) & "</td></tr>"
Response.Write sHTML
%>
So, other than writing a script (getSchedule) for the new Icon to redirect to another page, nothing else has changed.
Can anyone understand why this is looping so funny? If anything, you would think that it would repeat each record the same amount of times.
By the way, here is the page output source for that section: (duplicates highlighted in different colors)
<tbody class="blacklabel">
<tr><td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)"><input type=checkbox title=select value=20523 onclick="nopopup=true"></td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">6/1/2006</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">EBYSTRO</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">Edward Bystrom </td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)"> </td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">$0.00</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">$0.00</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">16</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">$0.00</td>
<td align=center><a HREF="javascript:getSchedule('EBYSTRO')" tabindex=-1><img SRC="../images/memo.gif" border=0 align=top ALT="Go to Scheduling module"></a></td></tr>
<tr><td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)"><input type=checkbox title=select value=20523 onclick="nopopup=true"></td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">6/1/2006</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">EBYSTRO</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">Edward Bystrom </td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)"> </td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">$0.00</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">$0.00</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">16</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">$0.00</td>
<td align=center><a HREF="javascript:getSchedule('EBYSTRO')" tabindex=-1><img SRC="../images/memo.gif" border=0 align=top ALT="Go to Scheduling module"></a></td></tr>
<tr><td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)"><input type=checkbox title=select value=22479 onclick="nopopup=true"></td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">9/12/2006</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">MJDALEY</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">Mike Daley </td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)"> </td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">$37.76</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">$0.00</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">5</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">$188.80</td>
<td align=center><a HREF="javascript:getSchedule('MJDALEY')" tabindex=-1><img SRC="../images/memo.gif" border=0 align=top ALT="Go to Scheduling module"></a></td></tr>
<tr><td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)"><input type=checkbox title=select value=20523 onclick="nopopup=true"></td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">6/1/2006</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">EBYSTRO</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">Edward Bystrom </td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)"> </td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">$0.00</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">$0.00</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">16</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20523)">$0.00</td>
<td align=center><a HREF="javascript:getSchedule('EBYSTRO')" tabindex=-1><img SRC="../images/memo.gif" border=0 align=top ALT="Go to Scheduling module"></a></td></tr>
<tr><td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)"><input type=checkbox title=select value=22479 onclick="nopopup=true"></td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">9/12/2006</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">MJDALEY</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">Mike Daley </td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)"> </td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">$37.76</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">$0.00</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">5</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(22479)">$188.80</td>
<td align=center><a HREF="javascript:getSchedule('MJDALEY')" tabindex=-1><img SRC="../images/memo.gif" border=0 align=top ALT="Go to Scheduling module"></a></td></tr>
<tr><td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20522)"><input type=checkbox title=select value=20522 onclick="nopopup=true"></td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20522)">6/1/2006</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20522)">MRNISSE</td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20522)">Mark Nissen </td>
<td onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20522)"> </td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20522)">$0.00</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20522)">$0.00</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20522)">16</td>
<td align=right onMouseOver="this.className='cellhilite';window.status='Edit Labour';return true;" onMouseOut="this.className='cellnohilite';window.status='Ready';return true;" onClick="editLineResource(20522)">$0.00</td>
<td align=center><a HREF="javascript:getSchedule('MRNISSE')" tabindex=-1><img SRC="../images/memo.gif" border=0 align=top ALT="Go to Scheduling module"></a></td></tr>
<tr VALIGN=TOP><td colspan=7 align=right>Total</td>
<td align=right>37</td>
<td align=right>$188.80</td></tr>
</tbody>
Thanks,
Parallon