Ver Mensaje Individual
  #2 (permalink)  
Antiguo 13/09/2004, 14:18
Avatar de KarlanKas
KarlanKas
Moderador extraterrestre
 
Fecha de Ingreso: diciembre-2001
Ubicación: Madrid
Mensajes: 6.987
Antigüedad: 22 años, 5 meses
Puntos: 61
Y si lo simplificamos con esta tontería:

Código HTML:
<html>
<head>
<script>
varMarkChk=0;
function comprobar(){
if(varMarkChk<1){

alert("Marque al menos un producto!");
return false;}

}
</script>
</head>
<body>
<form onsubmit="return comprobar()" action="javascript:alert('enviado');">
<input type="checkbox" name="pepe" onclick="varMarkChk+=(this.checked)?1:-1;">
<input type="checkbox" name="pepe2" onclick="varMarkChk+=(this.checked)?1:-1;">
<input type="checkbox" name="pepe3" onclick="varMarkChk+=(this.checked)?1:-1;">
<input type="checkbox" name="pepe4" onclick="varMarkChk+=(this.checked)?1:-1;">
<input type="checkbox" name="pepe5" onclick="varMarkChk+=(this.checked)?1:-1;">
<input type="checkbox" name="pepe6" onclick="varMarkChk+=(this.checked)?1:-1;">
<input type="submit">
</form>
</body>
</html> 
Te serviría?
__________________
Cómo escribir

No hay pregunta tonta, sino tonto que quiere seguir en la ignorancia.