Welcome Guest, Not a member yet? Register   Sign In
form_checkbox()
#1

[eluser]khmer angkor[/eluser]
[removed]
function checkall(num){
for ( i=0;i < document.action.elements.length ; i++ ){
if ( document.action.all.checked==true ){
document.action.elements[i].checked = true;
} else {
document.action.elements[i].checked = false;
}
}
[removed]
&lt;?include "header.php";?&gt;
<table width="770" border="1" style="border-collapse: collapse;">
<thead>
<tr>
<th>delete</th>
<th>devid</th>
<th>username</th>
<th>permission</th>
<th>lastname</th>
<th>firstname</th>
<th>Team</th>
<th>phone</th>
<th>joindate</th>
<th>gender</th>
<th>view</th>
</tr>
</thead>
<tbody>
&lt;?foreach ($query->result() as $row): ?&gt;
<tr>
<td>&lt;?echo form_checkbox('action', 'accept', FALSE);?&gt;</td>
<td>&lt;?=$row->devid?&gt;</td>
<td>&lt;?=$row->username?&gt;</td>
<td>&lt;?=$row->permission?&gt;</td>
<td>&lt;?=$row->lastname?&gt;</td>
<td>&lt;?=$row->firstname?&gt;</td>
<td>&lt;?=$row->Team?&gt;</td>
<td>&lt;?=$row->phone?&gt;</td>
<td>&lt;?=$row->joindate?&gt;</td>
<td>&lt;?=$row->gender?&gt;</td>
<td>&lt;?=anchor('welcome/view_dev/'.$row->devid, 'details')?&gt;</td>
</tr>
&lt;?endforeach;?&gt;
<tr>
<td width="5%" class="row_tittle">&lt;input type="checkbox" name="all"&gt;&lt;/td>
<td colspan=11 class="row_tittle" align=left>&lt;input type="submit" name="Submit" value="Delete select devloper"&gt;&lt;?=anchor('welcome/developer/', 'create')?&gt;</td>
</tbody>
</table>
&lt;? $string = "</div></div>";
echo form_close($string); ?&gt;
&lt;?include "footer.php";?&gt;


Anyone help me .my function red color.when i click on checkbox every checkbox in the form will be checked..
thanks,




Theme © iAndrew 2016 - Forum software by © MyBB