Results 1 to 3 of 3

Thread: Another Alternative?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2000
    Posts
    29

    Question

    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

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    what error were you getting with this one?
    Mark
    -------------------

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2000
    Posts
    29

    Exclamation 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
  •  



Click Here to Expand Forum to Full Width