Wednesday, 9 September 2015

OnLoad event is not triggering in a Webresource CRM 2013/2015

Hi,

Today, I did see one good issue.

We have a web resource which is placed on the form and we wanted to have some logic when it loads. I had initially written logic on the "onLoad" event but unfortunately it was firing.

The fix is simple, just write your logic inside document.ready event instead of load event.

Here is the syntax for it.

$(document).ready(function () {
    console.log("I am ready");
});

Make sure you add Jquery reference inside the web resource.

Hope this helps.

--
Happy CRM'ing

Gopinath

No comments:

Post a Comment