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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s