Aquí dejo un ejemplo de lo que he hecho por ahora.
Tal vez esté algo mal programado, pues yo de javascript no entiendo mucho, pero por ahora me funcionaba todo menos esto ultimo que nombre:
Copiar y pegar en el mismo dreamweaver para ver el efecto y su fallo.
Código PHP:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<script language="Javascript">
function cambiar(obj) {
elem=obj.parentNode.parentNode;
if(obj.checked){
elem.style.background='#ffff00';
document.formulario.cantidad.disabled = true;
document.formulario.marcado.checked = false;
}else{
elem.style.background='';
document.formulario.cantidad.disabled = false;
document.formulario.marcado.checked = true;
}
}
function ponertick(obj) {
if(document.formulario.marcado.checked){
document.formulario.cantidad.disabled = false;
document.formulario.marcado.checked = false;
obj.style.background='';
}else{
obj.style.background='#ffff00';
document.formulario.cantidad.disabled = true;
document.formulario.marcado.checked= true;
}
}
function pointer(obj){
obj.style.cursor='pointer';
}
</script>
<body bgcolor="#FFFFFF" text="#000000">
<form name="formulario">
<table width="331" border="1">
<tr name="fila" onMouseOver="pointer(this)" onClick="ponertick(this)">
<td width="33">
<input type="checkbox" onclick="cambiar(this)" name="marcado" value="checkbox">
</td>
<td width="113"> </td>
<td width="163">
<input type="text" name="cantidad" disabled>
</td>
</tr>
</table>
</form>
</body>
</html>