Ver Mensaje Individual
  #5 (permalink)  
Antiguo 10/02/2013, 12:07
Avatar de freesoftwarrior
freesoftwarrior
 
Fecha de Ingreso: marzo-2006
Mensajes: 362
Antigüedad: 18 años, 1 mes
Puntos: 10
Respuesta: Problema con eventos en la creación de inputs dinámicos

Sorry la demora en responder.
Modifiqué el código de esta forma

Cita:

boton = document.createElement('input');
boton.type = 'text';
boton.name = 'text'+icremento;
boton.id = 'text'+icremento;
boton.size = 10;
boton.style.border = "1px solid white";
boton.style.background = "#4F6497";
boton.style.color = "white";
boton.style.font = "x-small Arial";
boton.onfocus = function () {estilo(this.id,1)}
boton.onblur = function () {estilo(this.id,2)}
boton.onchange = function () {formato(this.value,'dec',this.id)}
boton.onkeypress = function () {return acceptNum2(event,this.id)}
contenedor.appendChild(boton);

sin embargo las funciones invocadas en los eventos onfocus y onblur no funcionan, las demás si.
No son funciones importantes pero me gustaría que funcionaran.

¿Alguna sugerencia?


Muchas gracias por tu apoyo
Un saludo desde Lima, Perú