Peterpan
01-03-2003, 01:39 PM
I got this menu on my web site that generate tabs on the fly mu problem is that I want the tab to becaome "on" when the querystring is = to the category in the database my probelm is from line 17 to 23 I do not get any error just the tab stay off
<center>
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td> </td>
</tr>
<tr valign="bottom">
<td><a href="./"><img src="images/tab-home-on.gif" alt="Home" width="49" height="26" border="0"></a></td>
<%
dim NavRS
set NavRS = server.createobject("adodb.recordset")
NavRS.activeconnection = objc
NavRS.open "SELECT * FROM categories ORDER BY id"
do while not NavRS.EOF
dim id, IntID
id = NavRS.Fields("id")
IntID = Int(id)
if request.querystring("category") = IntID then %>
<td> </td>
<td><a href="product.asp?category=<%=id%>"><img src="images/tab-<%=id%>-on.gif" border="0"></a></td>
<% else %>
<td> </td>
<td><a href="product.asp?category=<%=id%>"><img src="images/tab-<%=id%>-off.gif" border="0"></a></td>
<% end if %>
<%
NavRS.movenext
loop
%>
<td> </td>
<td><a href="ebay.asp"><img src="images/tab-ebay-off.gif" alt="" width="55" height="26" border="0"></a></td>
</tr>
</table>
</center>
<%
NavRS.Close
Set NavRS = Nothing
%>
<center>
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td> </td>
</tr>
<tr valign="bottom">
<td><a href="./"><img src="images/tab-home-on.gif" alt="Home" width="49" height="26" border="0"></a></td>
<%
dim NavRS
set NavRS = server.createobject("adodb.recordset")
NavRS.activeconnection = objc
NavRS.open "SELECT * FROM categories ORDER BY id"
do while not NavRS.EOF
dim id, IntID
id = NavRS.Fields("id")
IntID = Int(id)
if request.querystring("category") = IntID then %>
<td> </td>
<td><a href="product.asp?category=<%=id%>"><img src="images/tab-<%=id%>-on.gif" border="0"></a></td>
<% else %>
<td> </td>
<td><a href="product.asp?category=<%=id%>"><img src="images/tab-<%=id%>-off.gif" border="0"></a></td>
<% end if %>
<%
NavRS.movenext
loop
%>
<td> </td>
<td><a href="ebay.asp"><img src="images/tab-ebay-off.gif" alt="" width="55" height="26" border="0"></a></td>
</tr>
</table>
</center>
<%
NavRS.Close
Set NavRS = Nothing
%>