Ver Mensaje Individual
  #4 (permalink)  
Antiguo 26/10/2009, 14:12
Avatar de dcreate
dcreate
 
Fecha de Ingreso: octubre-2009
Ubicación: Veracruz
Mensajes: 536
Antigüedad: 14 años, 6 meses
Puntos: 22
Respuesta: como validar campos de texto

pues yo lo hago con javascript y es asi

<script>
function validar(formulario)
{
if(formulario.nombre.value=='' || formulario.nombre.value=='----NOMBRE COMPLETO----')
{
alert("LLENAR CAMPOS NECESARIOS\n-NOMBRE");
formulario.nombre.focus();
return false;
}
return true;
}
</script>

lo pones en la etiqueta head

y en el form pones estoç

<form onsubmit="return validar(this),etc,etc >

espero te sriva