views:

31

answers:

1

hi All, I want to add a function to OnChange event of textbox at runtime ( on page load). But if there is already a functio define at onchange event of the perticular textbox then i need to make sure the both function get a call at onchange event. How can I achive that? I am using IE7.

Thanks and regards, Tanmay.

+2  A: 

You can use the addEventLister function on that textbox

  var tb = document.getElementById("textbox");
  tb.addEventListener("change", function(evt) {
    alert(tb.value);
  });

But for older versions of IE (IE6), this will not work. For that you can use the addEvent

naikus

related questions