Hello,
I have received a new koollistbox.php file from KoolPHP Support which has been corrected and now the check / uncheck events are being fired.
I stiil have a problem. The KoolListBox do not have a selectAll nor a unselectAll methods and I have to walk through the checked list to uncheck all items in the list, but, when I call the methods to uncheck or to check the item the events are fired and the loop to change the check state for all items is interrupted.
This is the JavaScript function I am using to walk through the items of the list box:
function btLstMarkClick( sender )
{
var _items;
lsPtAllMarked = ! lsPtAllMarked ;
lsPtNoneMarked = !lsPtAllMarked;
if( lsCkPto ){
lRunningBatchCheck = true ;
_items = lsCkPto.get_items();
for( i=0; i < _items.length; ++i ){
if( lsPtAllMarked ) _items[i].check(); //marcar todos
else _items[i].uncheck();
}
}
if( lsPtAllMarked ) sender.src = btUnMarkUpImg.src;
else sender.src = btMarkUpImg.src;
lRunningBatchCheck = false;
}
// lRunningBatchCheck is used to control if the check / uncheck event must be handled
Thank you very much.
Best regards.