Add validation for the focus in hidden fields in the grid

This commit is contained in:
Julio Cesar Laura
2012-10-16 15:26:03 -04:00
parent 0dd1dbb5f7
commit 56763b7cbb

View File

@@ -685,8 +685,8 @@ var G_Grid = function(oForm, sGridName){
//Set focus the first element in the grid
for (var i = 0; i < this.aFields.length; i++) {
var fieldName = 'form[' + sGridName + '][' + currentRow + '][' + this.aFields[i].sFieldName + ']';
if (this.aFields[i].sType != 'file' && document.getElementById(fieldName).focus) {
document.getElementById(fieldName).focus();
if (this.aFields[i].sType != 'file' && this.aFields[i].sType != 'hidden' && document.getElementById(fieldName).focus) {
document.getElementById(fieldName).focus();console.log(fieldName);
break;
}
}