Ver Mensaje Individual
  #3 (permalink)  
Antiguo 13/11/2008, 12:34
Avatar de lobo_php
lobo_php
 
Fecha de Ingreso: noviembre-2007
Ubicación: Cali-Colombia
Mensajes: 1.869
Antigüedad: 16 años, 6 meses
Puntos: 75
Respuesta: ayuda con base de datos

mira donde estoy tratando de mandar ese atributo es en la funcion donde se crea el textbox:
Código HTML:
if (document.all)
{ // what follows should work 
// with NN6 but doesn't in M14
//uno
input1.type = fieldType;
input1.name = 'cod_med_'+i;
input1.value = '';
input1.setAttribute('onBlur', 'ventanaempresa(cod_med_1, desc_med_1)');
//input1.onBlur= 'ventanaempresa("cod_med_1", "desc_med_1")';
//dos
input2.type = fieldType;
input2.name = 'can_med_'+i;
input2.value = '';
//tres
input3.type = fieldType;
input3.name = 'desc_med_'+i;
input3.value = '';
i=i+1;
}
else if (document.getElementById)
{ 
//uno
input1.setAttribute('type', fieldType);
input1.setAttribute('name', 'cod_med_'+i);
input1.setAttribute('value', '');
input1.setAttribute('onBlur', 'ventanaempresa(cod_med_1, desc_med_1)');
//dos
input2.setAttribute('type', fieldType);
input2.setAttribute('name', 'can_med_'+i);
input2.setAttribute('value', '');
//tres
input3.setAttribute('type', fieldType);
input3.setAttribute('name', 'desc_med_'+i);
input3.setAttribute('value', '');
i=i+1;
}

input1.style.width="50px";
input2.style.width="50px";
input3.style.width="190px";
div.appendChild(input1);
div.appendChild(input2);
div.appendChild(input3);
document.getElementById('ficheros').appendChild(div);
}
}
en los textos:
input1.setAttribute('onBlur', 'ventanaempresa(cod_med_1, desc_med_1)');
es donde trato de ponerle al textbox que vaya a la funcion ventanaempresa y le mando los atributos pero cuando le escribo un valor y me salgo de la caja de textos (evento onBlur) no hace nada.
__________________
Cabuntu.org - Difundiendo Software Libre en Cali, Colombia
Usuario Linux # 483175