Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/07/2008, 09:53
cchusann
 
Fecha de Ingreso: julio-2008
Ubicación: Ecuador
Mensajes: 153
Antigüedad: 15 años, 10 meses
Puntos: 0
funciona en internet explorer pero no en firefox... ayuda!! como le hago !!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>formulario</title><style type="text/css">
<!--
body {
margin-right: 500px;
}
#menu1 a:link{color:black;text-decoration:none}
#menu1 a:hover{color:yellow;text-decoration:underline}
#menu1 a:active{color:black;background:black;text-decoration:overline}
#menu1 a:visited{color:none;font-style:italic}
.Estilo1 {
font-family: Verdana;
font-weight: bold;
font-size: 18px;
}
-->
</style>
<script language="javascript">
function valvacio(formulario){
var usuario=document.form1.txt_usu.value
var contrasena=document.form1.txt_contrasena.value
var nombre=document.form1.txt_nombre.value
var apellido=document.form1.txt_apellido.value
var cedula=document.form1.txt_cedula.value
var direccion=document.form1.txt_direccion.value
var er_nombre=/^([a-z]|[A-Z]|á|é|í|ó|ú|ñ|Ñ|\s|\.)/
var er_numero=/^([0-9\s\+\-])+$/
var er_email = /^(.+\@.+\..+)$/
if (usuario== ""){
alert("Debe de ingresar su usuario")
return false
}
if (contrasena==""){
alert("Debe de ingresar su contraseña")
return false
}
if (!er_nombre.test(nombre) || nombre=""){
alert("Debe de ingresar su nombre o Solo debe ingresar letras")
return false
}
if (!er_nombre.test(apellido) || apellido==""){
alert("Debe de ingresar su apellido o Solo debe ingresar letras")
return false
}
if (!er_numero.test(cedula) || cedula==""){
alert("Debe de ingresar su cedula o Solo debe ingresar numeros")
return false
}
if (direccion==""){
alert("Debe de ingresar su direccion")
return false
}
alert("ingreso registrado correctamente")
return true
}
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="" onsubmit="return valvacio(this)">
<table width="341" border="1" align="center" bgcolor="#6699CC">
<tr>
<td colspan="2"><div align="center">
<pre class="Estilo1">Nuevo Usuario </pre>
</div></td>
</tr>
<tr>
<td width="78"><strong>Usuario:</strong></td>
<td width="353"><input name="txt_usu" type="text" id="txt_usu"/></td>
</tr>
<tr>
<td><strong>Contrase&ntilde;a:</strong></td>
<td><input name="txt_contrasena" type="password" id="txt_contrasena" /></td>
</tr>
<tr>
<td><strong>Nombre:</strong></td>
<td><input name="txt_nombre" type="text" id="txt_nombre" /></td>
</tr>
<tr>
<td><strong>Apellido:</strong></td>
<td><input name="txt_apellido" type="text" id="txt_apellido" /></td>
</tr>
<tr>
<td><strong>Cedula:</strong></td>
<td><input name="txt_cedula" type="text" id="txt_cedula" /></td>
</tr>
<tr>
<td><strong>Direccion:</strong></td>
<td><input name="txt_direccion" type="text" id="txt_direccion" size="40" /></td>
</tr>
<tr>
<td colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;
<input name="Enviar" type="submit" id="enviar" value="Enviar"/>
<input name="limpiar" type="reset" id="limpiar" value="Restablecer" /></td>
</tr>
</table>
</form>
</body>
</html>


hola a todos... se le agrede por ayudarme....

lo unico que esto deberia de hacer es no dejarme guardar si es que no estan correctos los datos o si es que esta vacio y que salga un mens.... caso contrario que guarde y que salga un mens tambien.... probe en internet explorer y funciona pero en firefox 3.0 no me funciona como le hago...

una ayudita porfavor....