I want to attach an eventhandler to a html control in javascript code.
I tried using code like this:
var textBox = document.createElement('textarea');
textBox.setAttribute('cols', '14');
textBox.setAttribute('rows', '3');
textBox.setAttribute('id', GetTextBoxID(mainCell));
textBox.setAttribute('onblur', 'ChangeNodeName(' + textBox.id.toString() + ');');
mainCell.appendChild(textBox);
but the eventhandler doesn't execute.
what is the problem?
is there other ways?