Initiate through getScript function in Jquery

After the dhtmlxscheduler_mobile.js file is loaded using $.getScript() function, the dhx.ready event doesn’t trigger. Calling dhx.ui() without dhx.ready gives me a “TypeError: Cannot read property ‘c’ of null”

dhx.ready calls a function on window load event. So, it getScript executes dhx.ready after page loading the function won’t be called.

Thanks. Is there a way to call dhx.ui without dhx.ready?

yes, you may call dhx.ui to create scheduler. However, it can be done after page loading.

I get the following error when executing dhx.ui using this code:

Uncaught TypeError: undefined is not a function
b.O adhtmlxscheduler_mobile_formatted.js:1696
dhx.ui dhtmlxscheduler_mobile_formatted.js:1671
(anonymous function) Page3.html:38
f.extend._Deferred.e.resolveWith jquery-1.6.4.min.js:2
e.extend.ready jquery-1.6.4.min.js:2
c.addEventListener.C jquery-1.6.4.min.js:2

Is “schedulerDiv” created and attached to document when you are calling scheduler initialization ?

Is alert in the following example returns an object:

Yes it returns an object

Could you attach the sample that reproduces the problem?

scheduler library calls some configuaration methods on dhx.ready. And dhx.ready adds a function to an array of functions that are called on window load.
Therefore, dhx.ui for Scheduler should be called either in dhx.ready or from window.onload. In the latter case, you need to use a small delay:

or