Ver Mensaje Individual
  #5 (permalink)  
Antiguo 25/03/2011, 13:28
Avatar de saseisa
saseisa
 
Fecha de Ingreso: agosto-2006
Mensajes: 329
Antigüedad: 17 años, 7 meses
Puntos: 9
Respuesta: funcion y ajax

la funcion
Código:
function Mycheck() {
    Nombre_pf = document.form1.RFC.value;
    if (Nombre_pf.length == 12) {
        document.form1.nombre.disabled=false;
		rsocial.style.display = 'block';
        return false }
	 if (Nombre_pf.length == 13) {
		 rsocial.style.display = 'none'; //  (rsocial.style.display == 'none') ? 'block' : 'none';
		/*
        document.form1.nombre.disabled=true;
		document.form1.responsable.value='';
		document.form1.responsable.focus();*/
        return false }
	if (Nombre_pf.length <= 11) {
        window.alert("''RFC inválido''...el número de caracteres es menor al requerido    (P.Moral= 12   P.Fisica= 13)");
		document.form1.RFC.value='';
		return false }	

}
y este es el llamado del input puse el mycheck sin el return
Código:
<input name="username" type="text" id="username" value="" size="32" onBlur=" ComprobarUsuario('./comprobarUser.php','estadoUser'); Mycheck();" onKeyUp="this.value=this.value.toUpperCase()"  maxlength="13" tabindex="1"/>