Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/02/2003, 12:45
Avatar de batvampire
batvampire
 
Fecha de Ingreso: noviembre-2002
Mensajes: 87
Antigüedad: 21 años, 6 meses
Puntos: 0
Formulario q no deje campos de texto vacios

Hola!!!!!!!!!!!


Q le pongo a este mismo código para q no me deje dejar un campo de texto de un formulario en blanco.


PHP:--------------------------------------------------------------------------------
<script>
<!-- validar formulario para explorer y netscape y permitiendo signos

function validar(texto, e) {
if (navigator.appName == "Netscape") tecla = e.which;
else tecla = e.keyCode;
if (tecla > 47 && tecla < 58) return true;
if (tecla > 45 && tecla < 47) return true;
if (tecla == 0 || tecla == 8) return true;
return false;
}

//Fin de la ocultacion-->
</script>
--------------------------------------------------------------------------------





PHP:--------------------------------------------------------------------------------
<input type="text" name="da1[0]" onkeypress= "return validar(this.value, event)" size="1" maxlength="1">

<input type="text" name="da2[0]" onkeypress= "return validar(this.value, event)" size="1" maxlength="1">


<input type="submit" name="Submit" value="Continuar" >

--------------------------------------------------------------------------------


gracias
__________________
:pirata: