Ver Mensaje Individual
  #13 (permalink)  
Antiguo 23/09/2010, 14:54
Avatar de mexbale
mexbale
 
Fecha de Ingreso: septiembre-2010
Ubicación: Iztapalapa
Mensajes: 146
Antigüedad: 13 años, 7 meses
Puntos: 1
Respuesta: Problema con los FOCUS

hola gracias por la ayuda pero me manda un error me dice que requiere un objeto
y no se por que no punciona
lo puse asi:

<head>
<script>
function tabular(obj, tam) {
var frm=obj.form;
var largo = obj.value.length;
if (largo == tam) {
for(i=0;i<frm.elements.length;i++)
if(frm.elements[i]==obj) {
if (i==frm.elements.length-1) i=-1;
break }
frm.elements[i+1].focus();
return false;
}
}
</script>



<input name="CVE_ENT" type="text" id="CVE_ENT" size="2" maxlength="2" onkeypress="return tabular(this, this.maxLength)" />
<input name="CVE_MUN" type="text" id="CVE_MUN" size="3" maxlength="3" onkeypress="return tabular(this, this.maxLength)" />


no se que paso o a que se deba el error bueno gracias y espero que me puedan ayudar