i have a funny problem here.
I have a textarea with an onchange event linked to it. Then i have a button linked to an onclick event.
The text being put to th
try this to add event listener to components
document.getElementsByTagName("textarea")[0].addEventListener("change", function(){
alert( 'textarea');
});
document.getElementsByTagName("button")[0].addEventListener("click", function(){
alert( 'button');
});
if Ids are defined then use getElementById().