Espero que mepuedan ayudar con este problema.
Lo que pasa es que estoy generando unos checkbox que provienen de una consulta a una tabla y son de la siguiente manera
Código HTML:
<input type="checkbox" name="chk_col[]" id="chk_col[]" value="<?=$var_id_familia.'--xx--'.$row_art['id']; ?>" /> Y tengo un dos input que me dice marcar y desmarcar y son los siguiente
Código HTML:
<INPUT TYPE="button" NAME="marcar" VALUE="Marcar todos" onClick="modificar_boxes(true,'.$cantidad.')" /> <INPUT TYPE="button" NAME="desmarcar" VALUE="Desmarcar todos" onClick="modificar_boxes(false,'.$cantidad.')" />
Código HTML:
function modificar_boxes(chequear,cantidad)
{
for (i=0; i < cantidad ; i++ )
{
if (chequear)
{
alert("True:"+i);
document.getElementById('chk_col[]').checked=true;
}
else
{
alert("False :"+i);
document.getElementById('chk_col[]').checked=false;
}
}
}
Donde puede estar el error
Gracias y saludos a todos.

