V9 attachEvent in Jscript

Does anyone know if attachEvent works in V9?  I haven't been able to get it to work.  I know in 7.6 we would have code like this which would work:

 

function test{

  obj1 = document.getElementById(fieldName);

  obj1.attachEvent('onkeydown', testfunction);

  obj1.attachEvent('onkeyup', testfunction2);

}

 

We would call this function on form load and it would attach the handlers to the field.  Does anyone know the V9 equivalent? 

Tagged:

Comments

  • V9 uses Telerik Ajax controls.

     

    In order to get a handle of the control on the client side, use the $find function.

    The event for that control can be overriden as shown in the example below

     

     

    $find("myControlName")._element.onclick = 

     

    function () { testfunction(); };