Results 1 to 2 of 2

Thread: CheckBoxes

  1. #1 Guest

    Default CheckBoxes

    I&#039m populating a form with a number of checkboxes, which is unknown (not my use of arrays):<BR><BR>Dim chkKeywords(50)<BR>DO while NOT objRSr.EOF<BR>intX = intX + 1<BR>%&#062;<BR>&#060;input type="checkbox" class="one" name="&#060;%= "chkKeywords(" & intX & ")" %&#062;" value="&#060;%=objRSr("IPickkey") %&#062;"&#062; &#060;%=objRSr("CDesc")%&#062;<BR><BR>&#060;%<BR>o bjRSr.MoveNext<BR>LOOP<BR>objRSr.Close<BR>Set objCmd = Nothing<BR>Set objParam = Nothing<BR><BR>Then, this is how i am trying to evaluate the values of each checkbox selected, kinda like a visual trace:<BR>FOR p = 0 to intX<BR>response.write (CInt(chkKeywords(p))) & p & "<BR>"<BR>Next<BR><BR>The output i get is akin to...<BR>0 1<BR>0 2<BR>0 3<BR>0 4<BR>0 5<BR>0 6<BR>0 7<BR><BR>Any help, and any kind critique of my code, is always welcome.<BR>"Remember, mean people won&#039t inheritplanet Earth."<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: CheckBoxes

    You don&#039t actually populate the array. <BR><BR>Unless you&#039re not showing all the code, in the loop you need:<BR>chkKeywords(intX) = objRSr("IPickkey").

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts