Is it possible to hook a javascript function to every field on a form without using the onLoad and onSave event? RRS feed

  • Question

  • I have a function that formats a field but I need to hook it to every field on a form. The form has 50+ fields so I am wondering if it's possible to hook the function to every field without using the onLoad and onSave event handlers. The function is quite big so it needs to be applied only when those fields change. Is this possible?

    Saturday, June 22, 2013 11:12 PM

All replies

  • I am pretty sure JQuery can do this. So you would need to have JQuery then use the all selector

    $("*").click(function() {
      alert("Handler for .click() called.");
    But you'd need to make sure you function handled every single things which could be clicked, some of which will not be Dynamics fields. So this is only half an answer.

    Paul Developer of Summary Plus for Dynamics CRM. http://www.clew-consulting.com/summaryplus

    Sunday, June 23, 2013 7:47 PM