tags:

views:

351

answers:

2

HI,

I have multiple checkboxes in my report. I am using two buttons Select All and Deselect All for selecting all checkboxes and deselecting all checkboxes. But am not able to pass the checked values to another report. Only if I manually select the checkboxes then only those values are getting passed in the report.

Can anyone help me out with this?

+1  A: 

I assume your select all and deselect all buttons are using javascript to set or unset all the other checkboxes in the form.

unset checkboxes are not passed on. only the set one. If you need an explicit 0 or 1 to get passed over, you will have to do something like adding extra hidden fields are are sync'ed to the state of the checkboxes, but this will be riddled with problems (eg, no javascript = FAIL).

rikh
I need to pass the fields which have checkboxes. Like if i have checkboxes on item field, i have to pass all those items(which are selected onclick of selectall button) to another page.
A: 

You can have a bunch of hidden fields to accompany the checkboxes, and set their values when the checkboxes are unchecked.

Alternately, when you need two or more states for a field, use a radio button.

Diodeus
I need to pass the fields which have checkboxes. Like if i have checkboxes on item field, i have to pass all those items(which are selected onclick of selectall button) to another page.
Sorry, that's not how checkboxes behave - by design.
Diodeus
U mean to say that the way which i want checkboxes to be checked and passed to another report is not possible? I am new to javascript so please tell me how else can those items be passed on click of selectall button?
Please post a short code example.
Diodeus