Ver Mensaje Individual
  #5 (permalink)  
Antiguo 14/02/2006, 16:11
Avatar de mauricio2004
mauricio2004
 
Fecha de Ingreso: marzo-2004
Mensajes: 264
Antigüedad: 20 años, 1 mes
Puntos: 0
debo agradecer la ayuda de todos, en el foro de js, y php la funcion me resulto bien aunque no con todo lo que queria, pero en fin funciona perfecto ahi va

<script language="javascript" type="text/javascript">
<!--


function confirma(form)
{
var total = 0;
var ischeck;

var total = form.valores.value;

//alert(total);
for (var i= 0; i<total;i++)
{
//alert("document.form.noticia[" + i + "].checked");


if (eval(document.forms['form'].elements['noticia['+i+']'].checked) == true)
{
ischeck=1;
break;
}
}
if (ischeck==1)
{
if (confirm("¿Esta Seguro que quiere eliminar?"))
{
document.form.submit();
}

}
else
{
alert("Para eliminar debe seleccionar al menos una noticia");
}


}

-->
</script>


<input name="noticia[0]" type="checkbox" value="19">
<input name="noticia[1]" type="checkbox" value="1">
<input name="noticia[2]" type="checkbox" value="2">
<input name="noticia[3]" type="checkbox" value="3">
<input name="noticia[4]" type="checkbox" value="4">
<input name="noticia[5]" type="checkbox" value="5">


saludos

Gracias