What's the equivalent of an attachevent of CRM 4 within CRM 2011 ? RRS feed

  • Question

  • I have seen that "attachevent" is not supported anymore within a javascript web resource of CRM 2011.

    How can we attach event handler to javascript events (like onblur etc...) in a CRM 2011 javascript library ?

    Many thanks in advance,

    Thursday, May 19, 2011 2:20 PM


  • Hi,

    You could attach event as stated below,

    var el = document.getElementById(id);

    // Build your function with the help of below example
      var f = "var ef=function() { " +
    " };";


    // Attach to click event
      el.attachEvent("onblur", ef, false);


    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    Saturday, May 21, 2011 5:53 AM