When you run the application, runtime error is thrown as “Syncfusion is undefined” or “Object doesn’t support property or method ej”.
The above mentioned exception occurs, when the Syncfusion component script files are not referred properly.
The following Scripts and theme files are necessary for your components.
In the above code example, the scripts referred to the folder in which the script files are stored. Make sure that the above mentioned script files are loaded properly.
You need to load ej.web.all.min.js file even when you use mobile components. Refer to the following link to know more about the scripts files and dependencies.
Make sure that all the necessary dependency script files are included.
When you refer individual script files of the components instead of using the ej.web.all.min.js file, make sure all the dependency script files of the component are included.
For example, to use the Treeview component alone in your application and when you want to use only the script files needed by the Treeview component instead of using the entire ej.web.all.min.js file, refer to the following code example for the script files that are necessary for the Treeview component.
If you fail to load any dependency script file that are necessary for the Treeview component, then the error “object doesn’t support ej” occurs. For example, if you fail to include the “ej.checkbox.min.js” file, then on rendering the page, “Object doesn't support property or method 'ejCheckBox’” error is thrown.
How to identify the necessary scripts and dependencies of a particular component.
As an alternate solution to load the components, you can use the CDN links as follows.
Note: In the CDN link “http://cdn.syncfusion.com/22.214.171.124/js/web/flat-azure/ej.web.all.min.css”, “126.96.36.199” refers to the release version.
You can find the CDN links for External dependencies and Syncfusion dependencies in the link below.
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:|
or the page will be automatically redirected to sign-in page in 10 seconds.