The problem with check boxes is that they are not sent unless they are
checked. The problem occurs if you are expecting a one:one relationship
of checkboxes to other form values.

Radio buttons, on the other hand, can be paired (more than one for one)
so you can have a YES or NO instance of the same name and always set ONE
of them defaulted to CHECKED as they have different values. The form
will send the radiobutton values on each submit.

Just a thought.

-----Original Message-----
From: Michael_Schutte@xxxxxxxxxxxx
Reply-To: Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
To: Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
Subject: Re: [WEB400] CGIDEV2 getting checkbox values of same name.
Date: Fri, 22 Feb 2008 11:41:59 -0500

Sorry to post such nonsense... I hate when I post a question and figure
out the answer on my own anyway.

Anyway... I realized that the zhbGetVarCnt returns the number of checked
boxes, not the number of actual occurences in the html page. Then I needed
to assign a row value to the checkbox so that I could get actual row

<input type="checkbox" name="rowsel" value=1 />

Thanks for listening.

Michael Schutte
Admin Professional
Bob Evans Farms, Inc.

web400-bounces@xxxxxxxxxxxx wrote on 02/22/2008 11:31:04 AM:

I have in my html page. A list of checkboxes by the same name "rowsel"
expected to be able to use the zhbGetVarCnt('rowsel') to get the number
occurences and then loop through to determine the which ones were
However, it's working right. I was wondering is anyone had an ideas.

I found a sample on the web and I followed that sample as they have it
out but it doesn't appear to be working. I'm always getting a number of
occurrences of 1 and if I have a check box selected, it always looks
the first one was selected. Make sense?

<td class="GBLTblDtl1Select">
<input type="checkbox" name="rowsel" />
<td class="GBLTblDtl1Alpha">
<td class="GBLTblDtl1Alpha">
Chart of Accounts Listing
<td class="GBLTblDtl2Select">
<input type="checkbox" name="rowsel" />
<td class="GBLTblDtl2Alpha">
<td class="GBLTblDtl2Alpha">
CIS Code Correction

RecsOnPage = zhbGetVarCnt('rowsel');
For iX = 1 To RecsOnPage;
RowSelected = zhbGetVar('rowsel':iX);
If RowSelected <> 'on';

The sample I found on the web is here... Page 63 in the pdf.

Thank you for your help.

Michael Schutte
Admin Professional
Bob Evans Farms, Inc.

This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.