|
-
Dec 20th, 2000, 11:46 AM
#1
Thread Starter
Junior Member
Is there a better way to generate the checkbox(s) that I am using thah this?
<table border="1" cellpadding="10" cellspacing="0" bordercolor="#000000" bgcolor="#c0c0c0" WIDTH="594" align="center">
<tr>
<%If Not(rsOptions.EOF AND rsOptions.BOF) Then rsOptions.MoveFirst
numincol = rsOptions.recordcount \3+1
Do Until rsOptions.EOF%>
<td valign="top">
<%for i = 1 to numincol
If rsOptions.EOF Then Exit For%>
<input type="checkbox" name="<%=rsOptions.Fields("Description")%>" value="<%=rsOptions.Fields("ID")%>">
<%=rsOptions.Fields("Description")%><br>
<%rsOptions.MoveNext
Next%>
</td>
<%Loop%>
</tr>
</table>
This will create all the checkboxes I need from the database (over 60) but with the page I have now I get an error looking for an object
-
Dec 21st, 2000, 09:05 AM
#2
Frenzied Member
what error were you getting with this one?
-
Dec 21st, 2000, 10:26 AM
#3
Thread Starter
Junior Member
other alternative?
Microsoft VBScript runtime error '800a01a8'
Object required: ''
/admin/test.asp, line 486
this is the line with the error --> <%If Not(rsOptions1.EOF AND rsOptions1.BOF) Then rsOptions1.MoveFirst
numincol = rsOptions1.recordcount \3+1
Do Until rsOptions1.EOF%>
<td valign="top">
<%for i = 1 to numincol
If rsOptions1.EOF Then Exit For%>
<input type="checkbox" name="<%=rsOptions1.Fields("Description")%>" value="<%=rsOptions1.Fields("ID")%>">
<%=rsOptions1.Fields("Description")%><br>
<%rsOptions1.MoveNext
Next%>
</td>
<%Loop%>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|