currently, it works fine when clicking and staying in any table page
but when changing the page still there is a problem to be resolved.
//-------------------------------------------------------------------------------------------------------------------------
// the bellow sequence is very important for controlling the checkboxes relation header / rows
//-------------------------------------------------------------------------------------------------------------------------
$id = find_submit('_rec_'); // check if a row was clicked
if (!check_value('chkbx')) { update_all('0') ; } // always clear all the rows checkboxes whenever the header is not marked
if ( check_value('chkbx')==1 && $id == -1) { update_all('1') ; } // when we are sure that the header is
// clicked and not one of the rows was clicked
if ($id != -1) // when a row is clicked => toggle its mark & update the "sel_chk" field to (0 || 1 )
{
$chkbox_value = check_value("rec_".$id) ? '1' : '0';
update_gl_trans_sel_chk_value($id,$chkbox_value);
}
//--------------------------------------------------------------------------------------------------------------------------
// the above sequence is very important for controlling the checkboxes relation header / rows
//--------------------------------------------------------------------------------------------------------------------------
I m sure now that things are on the right track.
- the goods is I didn't use javascripts until now except of the standard ((( JsHttpRequest.request("_XXXX_update", this.form); )))
- the bads is that I was obliged to control the header checkbox through modifications in db_pager_view.inc file:
related to : $labels[0] <==> $table->columns->headers[0] ( table header )
thanks for your support
Khaled