Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hello all! It's me again. I hav

Status
Not open for further replies.

KatherineF

Technical User
Mar 3, 2003
124
US
Hello all!
It's me again.

I have a table populated from database, 2nd column has links:

|column0|column1|column2|column3|
|data|data | data | data|
|data|data | data | data|
|data|data | data | data|
|data|data | data | data|
|total|data | | |

last row should be like this:
|total| data | | |

I need to get rid of the link in the last row.
Help plz :)
 
Can you post the code that populates the table?
 
While ((Repeat1__numRows <> 0) AND (NOT rs.EOF))
%>
<tr
<td><%=(rs.Fields.Item(&quot;Name&quot;).Value)%></td>
<td> <% If rs.Fields.Item(&quot;count&quot;).Value <> 0 Then%><a href=&quot;page.asp?id=<%=(rs.Fields.Item(&quot;blabla&quot;).Value)%>&quot;><%=(rs.Fields.Item(&quot;smth&quot;).Value)%></a><%Else Response.Write(rs.Fields.Item(&quot;smth&quot;).Value) End If%>td>
<td><%=(rs.Fields.Item(&quot;ProjStock&quot;).Value)%></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rs.MoveNext()
Wend
 
While ((Repeat1__numRows <> 0) AND (NOT rs.EOF))
%>
<tr
<td><%=(rs.Fields.Item(&quot;Name&quot;).Value)%></td>
<td> <%
If rs.Fields.Item(&quot;count&quot;).Value <> 0 Then
Response.Write rs.Fields.Item(&quot;smth&quot;).Value
Else
Response.Write rs.Fields.Item(&quot;smth&quot;).Value
End If%>
<td>
<td><%=(rs.Fields.Item(&quot;ProjStock&quot;).Value)%></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rs.MoveNext()
Wend

 
since the value of the third cell is empty only on the final row, why not check that value and create the links accordingly?

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

fart.gif
 
do while not rs.eof
response.write &quot;<tr><td>&quot; & rs(&quot;name&quot;) & &quot;</td>&quot;
if rs(&quot;ProjStock&quot;) <> &quot;&quot; OR not isNull(rs(&quot;ProjStock&quot;)) then
response.write &quot;<td><a href='page.asp?id=&quot; & rs(&quot;id&quot;) & &quot;'>&quot; & rs(&quot;smth&quot;) & &quot;</a></td>&quot;
else
response.write &quot;<td>&quot; & rs(&quot;smth&quot;) & &quot;</td>&quot;
end if
response.write &quot;<td>&quot; & rs(&quot;ProjStock&quot;) & &quot;</td></tr>&quot;
rs.movenext
loop

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

fart.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top