Foros del Web » Programando para Internet » Javascript »

formulario no valida em firefox =/

Estas en el tema de formulario no valida em firefox =/ en el foro de Javascript en Foros del Web. basta yo retirar esta linea, para validar mío formulario, so ocorre em firefox, no saber mas o que hacer. gracias a cualquier ayuda. =] maldita ...
  #1 (permalink)  
Antiguo 16/12/2007, 21:35
 
Fecha de Ingreso: diciembre-2007
Mensajes: 2
Antigüedad: 16 años, 4 meses
Puntos: 0
formulario no valida em firefox =/

basta yo retirar esta linea, para validar mío formulario, so ocorre em firefox, no saber mas o que hacer.
gracias a cualquier ayuda. =]
maldita linha =] :<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"s>

html--------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"s>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="login.css" type="text/css">
<script src="valid_form.js"></script>
</head>
<body bgcolor="#0000ff">
<div id="geral">
<div id="conteudo">
<form action="index.php" name="nform" method="post" onsubmit="return validform()">
<p id="txtconteudo2" style="float:left;">CEP</p><input type="text" name="cep5" size="5" maxlength="5"> -
<input type="text" name="cep3" size="3" maxlength="3"><br>
<input type="submit" value="Continuar >>" id="submit">
</form>
</div>
</div>
</body>
</html>

JS------
function validform() {
if(nform.cep5.value.length == 0 && nform.cep3.value.length == 0){
alert("Digite um CEP CABECAO !!!");
return false;
}
if (nform.cep5.value.length != 5 || nform.cep3.value.length !=3){
alert("DIGITA O CEP POR GENTILIZA !!!!!! !!! !");
return false;
}
return true;
}

viva el ninho torres =]
  #2 (permalink)  
Antiguo 16/12/2007, 21:54
Avatar de Panino5001
Me alejo de Omelas
 
Fecha de Ingreso: mayo-2004
Ubicación: -34.637167,-58.462984
Mensajes: 5.148
Antigüedad: 20 años
Puntos: 834
Re: formulario no valida em firefox =/

Sólo tenés que referenciar correctamente el formulario agregándole document.:
Código PHP:
function validform() {
if(
document.nform.cep5.value.length == && document.nform.cep3.value.length == 0){
alert("Digite um CEP CABECAO !!!");
return 
false;
}
if (
document.nform.cep5.value.length != || document.nform.cep3.value.length !=3){
alert("DIGITA O CEP POR GENTILIZA !!!!!! !!! !");
return 
false;
}
return 
true;

  #3 (permalink)  
Antiguo 17/12/2007, 11:57
 
Fecha de Ingreso: diciembre-2007
Mensajes: 2
Antigüedad: 16 años, 4 meses
Puntos: 0
Re: formulario no valida em firefox =/

Cita:
Iniciado por Panino5001 Ver Mensaje
Sólo tenés que referenciar correctamente el formulario agregándole document.:
Código PHP:
function validform() {
if(
document.nform.cep5.value.length == && document.nform.cep3.value.length == 0){
alert("Digite um CEP CABECAO !!!");
return 
false;
}
if (
document.nform.cep5.value.length != || document.nform.cep3.value.length !=3){
alert("DIGITA O CEP POR GENTILIZA !!!!!! !!! !");
return 
false;
}
return 
true;

Hola panino tu es monstruoso, felicidad grande compañero, tudo de mejor para usted.

Última edición por kasparov; 17/12/2007 a las 11:59 Razón: escribir incorreno =]
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 01:17.