This is just fyi if anybody is interested.

Below is an excerpt from an email I sent to somebody with whom I am working
on a project.  active-flag is a checkbox field.  I had thought that for as
many occurrences of any field as there were on the page, there would be  a
series of web vars returned, with the naming convention "field",
"field[1]", "field[2]", ...., where "[N}" is part of the actual name of the
web var, not a numeric array subscript (though clearly you could  convert
it to that).

Evidently there is at least one exception.

>4.  I still have no idea why active-flag seems not to have a web variable
if you don't check it.  As I mentioned, from a test project one would
believe that there would always be a value, checked or not.  I have just
been checking it, as I wanted to run down some of the above stuff first.
>
>PS:  OK, I understand what ND is (not) doing, now the question is what to
do in our code, and which of us should do it.  I had a test page with a
repeated with the default  10 rows.  The repeated contained a checkbox
field.  In that scenario, I got a web var back for each occurrence,
regardless of whether I checked it or not, in the sequence cbField,
cbField[1], cbField[2]...... Value "T" if checked, "F" if not checked.
>
>I then added a page-level single-occurrence checkbox with totally default
properties.  When I checked it, I got a web var back matching the field
name, and a value of "T".  When I did not check it, I got no web var back.
>
>Then I changed the 'maxdisplayrows' property of the repeated from 10 to 1.
 This time, the now single-occurrence checkbox on the repeated behaved
exactly the same as the single-occurrence checkbox at the page level, only
returning a value if checked.
>
>So we  can infer that if you call getWebVar using the name of a checkbox
field as the argument, and the return is null (assuming that the argument
corresponds to a valid field on the page), that there was only one
occurrence of the field, and that it was unchecked.
>
_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to