Welcome Guest, Not a member yet? Register   Sign In
check all with checkbox
#1

[eluser]iaa ioo[/eluser]
$new_order = ($order_type == 'asc' ? 'desc' : 'asc');$this->table->set_heading(
form_checkbox(),
'No',
anchor('awal/kami/'.$offset.'/nama_panggilan/'.$new_order, 'Nama'),
anchor('awal/kami/'.$offset.'/jk/'.$new_order, 'JK'),
anchor('awal/kami/'.$offset.'/alamat/'.$new_order, 'Alamat'),
anchor('awal/kami/'.$offset.'/no_hape/'.$new_order, 'No HP'),
'Pilihan'
);
$i = 0 + $offset;
foreach ($saudara2 as $saudara){
$this->table->add_row(form_checkbox('check[]', $saudara->identitas_id),
++$i,
$saudara->nama_panggilan,
$saudara->jk,
$saudara->alamat,
$saudara->no_hape,
anchor('awal/view/'.$saudara->identitas_id,'Detil',array('class'=>'view')).' '.
anchor('awal/update/'.$saudara->identitas_id,'Ubah',array('class'=>'update')).' '.
anchor('awal/delete/'.$saudara->identitas_id,'Hapus',array('class'=>'delete','onclick'=>"return confirm('Apakah anda yakin ingin menghapus data?')"))
);
}


dear master,,please help to make "check all" in this script..Smile
#2

[eluser]Aken[/eluser]
You need to do it with Javascript. Do a Google search for "select all checkboxes" or something along those lines.
#3

[eluser]iaa ioo[/eluser]
ok,,mr. aken,,thanks for the reply,,,i will try it..
#4

[eluser]iaa ioo[/eluser]
sorry mr. aken,,,i have already try with jquery,,but it still not work,,,can you please help me...my scrip look like this :

[removed]
<!--

<!-- Begin
function Check(chk)
{
if(document.myform.Check_ctr.checked==true){
for (i = 0; i < chk.length; i++)
chk[i].checked = true ;
}else{

for (i = 0; i < chk.length; i++)
chk[i].checked = false ;
}
}

// End --&gt;
[removed]

$js =
form_checkbox('check', 'cek', TRUE, $js) <--check all

form_checkbox('check_list', $saudara->identitas_id) <--check from table




Theme © iAndrew 2016 - Forum software by © MyBB