iridium192
06-19-2003, 11:04 AM
I am trying to display a list of records, each with a link that changes the value of a query string in turn changing the content of the page and disabling the link of the selected record. *deep breath*
If I declare the “value2” variable outside the loop it doesn’t change the value from one record to the next. All records would have the same value2 as the first record in the loop.
If I add <% value1 %> = <% value2 %> within the loop I get the right values for each record. Im not sure why the if then expression doesn’t work.
If I change “value2” to a static value that reflects a specific record (ie value2 = “5”) it does change the link for that record.
The data type of field1 is number. There are no extra spaces.
Thanks for any help.
<%
While ((Repeat__numRows <> 0) AND (NOT recordset.EOF))
%>
<% Dim value1, value2
value1 = Request.QueryString("string1")
value2 = recordset.Fields.Item("field1").Value
%>
<% If value2 = value1 Then %>nolink<% Else %><a href="?string1=<%=( recordset.Fields.Item("field1").Value)%>link</a><% End If %>
<%
Repeat__index=Repeat__index+1
Repeat__numRows=Repeat__numRows-1
recordset.MoveNext()
Wend
%>
If I declare the “value2” variable outside the loop it doesn’t change the value from one record to the next. All records would have the same value2 as the first record in the loop.
If I add <% value1 %> = <% value2 %> within the loop I get the right values for each record. Im not sure why the if then expression doesn’t work.
If I change “value2” to a static value that reflects a specific record (ie value2 = “5”) it does change the link for that record.
The data type of field1 is number. There are no extra spaces.
Thanks for any help.
<%
While ((Repeat__numRows <> 0) AND (NOT recordset.EOF))
%>
<% Dim value1, value2
value1 = Request.QueryString("string1")
value2 = recordset.Fields.Item("field1").Value
%>
<% If value2 = value1 Then %>nolink<% Else %><a href="?string1=<%=( recordset.Fields.Item("field1").Value)%>link</a><% End If %>
<%
Repeat__index=Repeat__index+1
Repeat__numRows=Repeat__numRows-1
recordset.MoveNext()
Wend
%>