The image is an example of what I want. When it is checkado
to checkbox
of verificaçãoAntiga
, it makes Text
Versao Nova
active. He does this at first but not at others. Can someone help me?
<?php
include('conect.php');
$result = mysqli_query($conn,"SELECT * FROM 'op' WHERE 'type' = 2 ;");
echo "<table class='table table-striped table-hover'id='datatables-example'>
<tr>
<td class='pure-table'><b>Title 1</b></td>
<td class='pure-table'><b>Title 2</b></td>
<td class='pure-table'><b>Check 1</b></td>
<td class='pure-table'><b>Title 3</b></td>
<td class='pure-table'><b>VCheck 2</b></td>
</tr>";
while($row = mysqli_fetch_array($result))
{
echo "<tbody data-link='row' class='rowlink'>
<tr>
<td>' . $row['Op'] . '</td>
<td> <input type='text' name='T2' class='form-control'></td>
<td style='text-align:center;'> <input type='checkbox' name='C1' id='C1' ></td>
<td> <input type='text' name='T3' id='T3' class='form-control' disabled ></td>
<td style='text-align:center;'> <input type='checkbox' name='C2'></td>
</tr>
</tbody>
}
</table>";
mysqli_close($conn);
?>
<script language ="JavaScript">
document.getElementById('C1').onchange = function() {
document.getElementById('T3').disabled = !this.checked;
};
Home
If I was not explicit in what I intended, please ask. Thank you.