Multiple selection


#1

Hi,

I have a table with a paginator and each row displays its own
checkbox.
I want to be able to offer actions like
select_all/deselect_all/select_partial.
The problem how does on record user actions so that the form is
correctly posted once the user hits submit ?

Can anyone point me out to an elegant solution to this common problem
?
Code or article would be great !!

Many Thanks…


#2

Hi,

  Every Html controls should have id field. So, first make urself to 

use id for any field, even it is a simple text box, Okay. This will make
u code well & efficient. If, u don’t understand, no pbm. Just keep it.
Later, u will understood. Then,

For ur problem,
—> Assign a id for ur form.

—> Have a link like this,
Check All
UnCheck All
—> For this, u need foll. javascript code,

function checkAll(t){
var el = document.getElementById(t);
for (var i = 0; i < el.elements.length; i++) {
el.elements[i].checked = true;
}
}

       function unCheckAll(t){
          var el = document.getElementById(t);
    for (var i = 0; i < el.elements.length; i++) {
       el.elements[i].checked = false;
    }
       }
    </script>

—> Come on. What happens? Bye. Thank U!!!.

De Railed wrote:

Hi,

I have a table with a paginator and each row displays its own
checkbox.
I want to be able to offer actions like
select_all/deselect_all/select_partial.
The problem how does on record user actions so that the form is
correctly posted once the user hits submit ?

Can anyone point me out to an elegant solution to this common problem
?
Code or article would be great !!

Many Thanks…