Amigos, tengo una dificultad, les describo el contexto:
- Tengo un campo de texto normal.
Código HTML:
<input name="contr" type="text" id="contr" style="width:150px;" tabindex="6"> Código HTML:
function asignar()
{
var forms = new Array('form_incluir','itemes');
for (z=0; z < forms.length; z++)
{
for (i=0; f=ref(forms[z]).elements[i]; i++)
{
if ( (typeof f.readOnly == 'undefined' && !f.disabled ) || (f.readOnly != true && f.type != "button" && typeof f.readOnly != 'undefined'))
{
if (f.onkeypress == null) {f.onkeypress = function() {return hEnter(this, event);}}
if (f.onfocus == null){f.onfocus = function() {foco_in(this);}}
if (f.onblur == null) {f.onblur = function() {foco_out(this);}}
}
}
}
}
Código HTML:
function hEnter (field, event, oN, oK)
{
var key = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
if (key == 13) {
for (i = 0; i < field.form.elements.length; i++)
{
if (field == field.form.elements[i])
break;
}
i = (i + 1) % field.form.elements.length;
x = field.form.elements[i];
if ((typeof x.readOnly == 'undefined' && x.disabled ) || (x.readOnly == true && x.type != "button" && typeof x.readOnly != 'undefined') || (typeof x.readOnly != 'undefined' && x.type=='hidden'))
{i++;}
field.form.elements[i].focus();
return false;
}
}
Código HTML:
Error: event has no properties Archivo de origen: funciones.js Línea: 25
Código HTML:
<input name="fecha" type="text" id="fecha" style="width:87px;" tabindex="15" onKeyPress="return hEnter(this, event);"> Desde ya muchas gracias,
Saludos

