checkboxes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • simon

    checkboxes

    Hi,

    I want to generate an array of checkboxes but this doesn't work. Can
    anyone help, please?

    int NumBoxes = 4;
    CheckboxField[] Checkbox = new CheckboxField[NumBoxes];

    Checkbox[0] = new CheckBoxField(" One", false);
    Checkbox[1] = new CheckBoxField(" Two", false);
    Checkbox[2] = new CheckBoxField(" Three", false);
    Checkbox[3] = new CheckBoxField(" Four", false);

    add(Checkbox);

    Thanks, Simon
  • George M Jempty

    #2
    Re: checkboxes

    simon wrote:
    [color=blue]
    >
    > I want to generate an array of checkboxes but this doesn't work. Can
    > anyone help, please?
    >
    > int NumBoxes = 4;[/color]

    Any sort of Javascript debugger you might have availed yourself of
    should have choked right here. Your code isn't Javascript: it appears
    to be Java.

    Comment

    Working...