Ver Mensaje Individual
  #7 (permalink)  
Antiguo 23/01/2007, 11:44
carlosbueno
 
Fecha de Ingreso: febrero-2005
Mensajes: 976
Antigüedad: 19 años, 3 meses
Puntos: 2
Re: Comprobar Rellenar Campo Formulario

hola nuevamente, derkenuke perdona pero no pude poner el codigo que yo tenia hecho cuando cree este post.......pero lo pongo ahora, este es el codigo que tengo puesto en un formulario para validarmelo, pero no me funciona, a ver si me podrias decir si hay algun error y el motivo por el cual no me funciona.........

<script language='JavaScript'>
function comprobar()
{
if (informacion_distribuidores.INFONOMBRE.value=="")
{
alert("Debe de rellenar el campo 'nombre'");
informacion_distribuidores.INFONOMBRE.focus();
return;
}
if (informacion_distribuidores.INFOEMPRESA.value=="")
{
alert("Debe de rellenar el campo 'empresa'");
informacion_distribuidores.INFOEMPRESA.focus();
return;
}
if (informacion_distribuidores.INFONIFCIF.value=="")
{
alert("Debe de rellenar el campo 'Nif/Cif'");
informacion_distribuidores.INFONIFCIF.focus();
return;
}
if ((isNaN(informacion_distribuidores.INFONIFCIF.valu e))&&(informacion_distribuidores.INFONIFCIF.value. leght!=0))
{
alert("El campo 'Nif/Cif' debe ser numerico");
informacion_distribuidores.INFONIFCIF.select();
informacion_distribuidores.INFONIFCIF.focus();
return;
}
if (informacion_distribuidores.INFOACTIVIDAD.value==" ")
{
alert("Debe de rellenar el campo 'Actividad'");
informacion_distribuidores.INFOACTIVIDAD.focus();
return;
}
if (informacion_distribuidores.INFODIRECCION.value==" ")
{
alert("Debe de rellenar el campo 'Direccion'");
informacion_distribuidores.INFODIRECCION.focus();
return;
}
if (informacion_distribuidores.INFOPOBLACION.value==" ")
{
alert("Debe de rellenar el campo 'Poblacion'");
informacion_distribuidores.INFOPOBLACION.focus();
return;
}
if ((isNaN(informacion_distribuidores.INFOCP.value))& &(informacion_distribuidores.INFOCP.value.leght!=0 ))
{
alert("El campo 'Codigo Postal' debe ser numerico");
informacion_distribuidores.INFOCP.select();
informacion_distribuidores.INFOCP.focus();
return;
}
if (informacion_distribuidores.INFOPROVINCIA.value==" ")
{
alert("Debe de rellenar el campo 'Provincia'");
informacion_distribuidores.INFOPROVINCIA.focus();
return;
}
if (informacion_distribuidores.INFOTELEFONO.value=="" )
{
alert("Debe de rellenar el campo 'Telefono'");
informacion_distribuidores.INFOTELEFONO.focus();
return;
}
if ((isNaN(informacion_distribuidores.INFOTELEFONO.va lue))&&(informacion_distribuidores.INFOTELEFONO.va lue.leght!=0))
{
alert("El campo 'Telefono' debe ser numerico");
informacion_distribuidores.INFOTELEFONO.select();
informacion_distribuidores.INFOTELEFONO.focus();
return;
}
if (informacion_distribuidores.INFOEMAIL.value=="")
{
alert("Debe de rellenar el campo 'E-mail'");
informacion_distribuidores.INFOEMAIL.focus();
return;
}
if (informacion_distribuidores.INFOCOMENTARIOS.value= ="")
{
alert("Debe de rellenar el campo 'Resumen'");
informacion_distribuidores.INFOCOMENTARIOS.focus() ;
return;
}
else
{
informacion_distribuidores.submit();
return;
}
}


</script>


espero que puedan ayudarme y decirme por que no me funciona

muchas gracias nuevamente
y un saludo
carlosbueno