|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by frippel in Active Server Pages (ASP)
Hi i'm trying to get a loop within an if statement of a form.
Here bellow the code
the (y) is from another loop and the avoorbeh comes from another recordset.
Everything works well except the loop in the if statement: <%if avoorbeh&(i )<> "0" then%>
avoorbeh&(i) can be avoorbeh1, avoorbeh2, ... avoorbeh99 etc.
Now i just converts the value to (i) for e.g. 1 without actually checking the value of avoorbeh1 that can be 0...
i don't even know if it's possible to do a loop in an if clause...
Thanx in advance
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
|
<%
if i= "" then
i = 1
else
i = i
end if %>
<%
IDvoor = Recordset2("IDvoorbeh")
voorbehh = Recordset2("voorbeNL")%>
<%if avoorbeh&i <> "0" then%>
<input name="voorbeh<%=i%><%=y%>" type="checkbox" value="<%=IDvoor%>" checked> <%=voorbehh%><br>
<%else%>
<input name="voorbeh<%=i%><%=y%>" type="checkbox" value="<%=IDvoor%>"> <%=voorbehh%><br>
<%end if%>
<%i = i + 1%>
|
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625