jQuery UI Widgets › Forums › Lists › ListBox › Cannot read property ‘createInstance’.
Tagged: jqxListBox, list
This topic contains 5 replies, has 2 voices, and was last updated by Dimitar 12 years ago.
-
Author
-
Hello. I trying implement ListBox widget to my web site. But when i call "$("#list").jqxListBox({ allowDrop: true, allowDrag: true, source: source, width: 200, height: 250});" i see error message "Uncaught TypeError: Cannot read property 'createInstance' of undefined". Can you help me resolve this problem?
Hello tremi,
Here is an example based on your code which works perfectly fine:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <title>jQuery ListBox Sample</title> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="../scripts/jquery-1.7.2.min.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxlistbox.js"></script> <script type="text/javascript" src="../jqwidgets/jqxdragdrop.js"></script> <script type="text/javascript"> $(document).ready(function () { var source = [ "Affogato", "Americano", "Bicerin", "Breve", "Café Bombón", "Café au lait", "Caffé Corretto", "Café Crema", "Caffé Latte", ]; // Create a jqxListBox $("#list").jqxListBox({ allowDrop: true, allowDrag: true, source: source, width: 200, height: 250 }); }); </script></head><body> <div id="list"> </div></body></html>
Best Regards,
DimitarjqWidgets team
http://www.jqwidgets.com/I use this widget in context of emberJs application. And i want to know what can call this error.
error details:
Uncaught TypeError: Cannot read property ‘createInstance’ of undefined jqxcore.js:195
(anonymous function) jqxcore.js:195
e.extend.each jquery-1.7.2.min.js:469
e.fn.e.each jquery-1.7.2.min.js:332
a.jqx.jqxWidget.a.fn.(anonymous function) jqxcore.js:169
a.extend.createInstance jqxscrollbar.js:7
(anonymous function) jqxcore.js:196
e.extend.each jquery-1.7.2.min.js:469
e.fn.e.each jquery-1.7.2.min.js:332
a.jqx.jqxWidget.a.fn.(anonymous function) jqxcore.js:169
a.extend.createInstance jqxlistbox.js:7
(anonymous function) jqxcore.js:196
e.extend.each jquery-1.7.2.min.js:469
e.fn.e.each jquery-1.7.2.min.js:332
a.jqx.jqxWidget.a.fn.(anonymous function) jqxcore.js:169
(anonymous function) DashboardController.js:54
f.Callbacks.o jquery-1.7.2.min.js:581
f.Callbacks.p.add jquery-1.7.2.min.js:589
e.fn.e.ready jquery-1.7.2.min.js:334
Astrum.dashboardController.Ember.ArrayController.create.alert DashboardController.js:37
ActionHelper.registerAction.ActionHelper.registeredActions.(anonymous function).handler ember-1.0.pre.js:19458
Ember.EventDispatcher.Ember.Object.extend.setupHandler ember-1.0.pre.js:11250
f.event.dispatch jquery-1.7.2.min.js:1180
f.event.add.h.handle.iHi tremi,
Did you try our example and did you include all the necessary .js files in your project?
Best Regards,
DimitarjqWidgets team
http://www.jqwidgets.com/Hi Dimitar,
I try example. Its work. But in context of my application i see error. And i use all necessary .js files.
Hi tremi,
I’m afraid the cause of this issue is unknown to us. However, you may sent a code snippet to support@jqwidgets.com so that we can test it locally and probably be of more help.
Best Regards,
DimitarjqWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.