|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Hopefully a simple fix ;P
The address to that page with the problem is http://www.helpyourgrades.com/search.asp , basically when there is an odd number of items being displayed it gives an error next to the last entry. below is part of the code, It seems like all it would need is a End If by the first rs.movenext, but I have been unable to get it to work. The code is in asp.
Thanks in advance, AJ. ______________ Code:
table align="center" class="sample" width="75%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td align="center" width="50%"><font size="4" color="white"><font size="4" color="white"><a href = "product.asp?id=<%=rs("id")%>"> <%=rs("name")%></a><br><br><img align="center" src="pics/<%=rs("image")%>.jpg"></td>
<% rs.movenext %>
<td align="center" width="50%"><font size="4" color="white"><font size="4" color="white"><a href = "product.asp?id=<%=rs("id")%>"> <%=rs("name")%></a><br><br><img align="center" src="pics/<%=rs("image")%>.jpg"></td>
</tr>
</table>
<br><br><br>
<% rs.movenext
Loop
End if
%>
|
|
#2
|
||||
|
||||
|
why do you have two rs.movenext in your code? that is an issue. what are you trying to accomplish by doing that?
__________________
Come JOIN the party!!! Quote of the Month: Trouble: Luck can't last a lifetime unless you die young. Questions to Ponder: Do cemetery workers prefer the graveyard shift? iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright© 2008 sbenj69 |
|
#3
|
||||
|
||||
|
I don't see the beginning of your IF statement in the example. However, the code needs to check for EOF after the rs.movenext prior to the second td tag.
__________________
Wolffy ------------------------ Teaching people to fish. |
|
#4
|
|||
|
|||
|
I would suggest looking into using the Mod function built into VBScript.
Also, you do not need two rs.MoveNext lines. This is the reason it is causing your error. Why? Because the first rs.MoveNext is moving to the END of the recordset so when the second rs.MoveNext is executed, it is already at the END of the recorset, therefore causing the EOF or BOF error (End of File / Beginning of File).
__________________
"You'll never be as perfect as BLaaaaaaaaarche." |
![]() |
| Viewing: ASP Free Forums > Programming > ASP Development > Hopefully a simple fix ;P |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|