Key press event is not working in Mozilla Firefox. I have create a table row dynamically with a text boix in it and that text box has a key press event too.
var el = document.createElement('input');
el.type = 'text';
el.name = 'suggest2';
el.setAttribute("id",str2);
el.setAttribute("onkeypress","additemifenter(this.id)");
cell2.appendChild(el);
row.appendChild(cell2);
In google chrome the function additemifenter(this.id) is called. But in firefox that function is not getting executed. What is the alternate way to do this in firefox?