How do find the id of the button which is being clicked?
(I think the id
attribute needs to start with a letter. Could be wrong.)
You could go for event delegation...
function reply_click(e) {
e = e || window.event;
e = e.target || e.srcElement;
if (e.nodeName === 'BUTTON') {
alert(e.id);
}
}
...but that requires you to be relatively comfortable with the wacky event model.