Trouble with IF statement
Hello and thank you for taking a moment to read this message. I am trying to test for a value called sNamewith an IF statement.The statement tests for the value and assigns a particular url to a hyperlink. I cannot get this to work. If anybody has any insights to give I would be extremely greatful.
Thank You,
Jason
<%Do While Not rsItemsList.Eof
surl = sNonSecurePath & "items.asp?CartId=" & sCartID & "&Mc=" & server.URLencode(rsItemsList("CODE"))
surlgrind=sNonSecurePath & "items_meatgrind_subcat.asp?CartId=" & sCartID & "&Mc=" & server.URLencode(rsItemsList("CODE"))
Call Displaylist(SName,surl,surlgrind)
rsItemsList.Movenext
Loop
Sub DisplayList(sName,surl,surlgrind)%>
If sName="Grinders" Then
<tr>
<td valign="top" width="8%" align="right"><img src="images/dot.gif" width=5 height=5 vspace="6" border=0 alt=""></td>
<td valign="top" width="90%"><a class="featured" href=<%=surlgrind%>><%=sName%></a></td>
</tr>
ELSE
<tr>
<td valign="top" width="8%" align="right"><img src="images/dot.gif" width=5 height=5 vspace="6" border=0 alt=""></td>
<td valign="top" width="90%"><a class="featured" href=<%=surl%>><%=sName%></a></td>
</tr>
END IF
<%End Sub%>
|