Ver Mensaje Individual
  #2 (permalink)  
Antiguo 03/08/2006, 10:40
Avatar de TolerantX
TolerantX
 
Fecha de Ingreso: marzo-2006
Ubicación: Guadalajara, México.
Mensajes: 408
Antigüedad: 19 años
Puntos: 10
Por fin pude hacerlo, dejo mi solución por si alguien más lo necesita.

Código:
function CheckFSEs(chkbox){
chkbox = document.forms["form1"].elements[chkbox];
for(var n=0;n<chkbox.length;n++){
	if (document.form1.afse.checked == true) {
		chkbox[n].checked=true;
	} else {
		chkbox[n].checked=false;
		}
	}
}
function CheckPPALs(chkbox){
chkbox = document.forms["form1"].elements[chkbox];
for(var n=0;n<chkbox.length;n++){
	if (document.form1.appal.checked == true) {
		chkbox[n].checked=true;
	} else {
		chkbox[n].checked=false;
		}
	}
}
Código:
<input type="checkbox" name="afse" value="" onclick="CheckFSEs('fse[]')" />
...
<input type="checkbox" name="fse[]" value="<?php echo $row_consulta['id_consulta']; ?>"/>


<input type="checkbox" name="appal" value="" onclick="CheckPPALs('ppal[]')" />
...
<input type="checkbox" name="ppal[]" value="<?php echo $row_consulta2['consulta2']; ?>" />
Salu2
__________________
TolerantX
http://tolerantx.com
Linux User #385226