jQWidgets Forums

jQuery UI Widgets Forums Lists ListBox Listbox not getting displayed

This topic contains 5 replies, has 2 voices, and was last updated by  Peter Stoev 9 years ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Listbox not getting displayed #84222

    Nishchaljain
    Participant

    Hi i am trying to simply display a listbox on a change event of a dropdownlist but getting error : “Uncaught TypeError: $(…).jqxListBox is not a function”. Below is my code :

    <div id=’jqxWidget1′>
    <div style=”float: left; height: 100px;” id=”listBoxA”>
    </div>
    <div style=”margin-left: 20px; float: left;” id=”listBoxB”>
    </div>
    </div>

    <link href=”~/jqwidgets/styles/jqx.base.css” rel=”stylesheet” />
    <link href=”~/Content/bootstrap.min.css” rel=”stylesheet” />
    <link href=”~/Content/toastr.css” rel=”stylesheet” />
    <link rel=”stylesheet” href=”//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css”>

    <script src=”~/Scripts/jquery-1.12.3.min.js”></script>
    <script src=”~/Scripts/toastr.js”></script>
    <script src=”~/Scripts/demos.js”></script>
    <script src=”~/jqwidgets/jqxcore.js”></script>
    <script src=”~/jqwidgets/jqxdata.js”></script>
    <script src=”~/jqwidgets/jqxbuttons.js”></script>
    <script src=”~/jqwidgets/jqxscrollbar.js”></script>
    <script src=”~/jqwidgets/jqxlistbox.js”></script>

    $(“#ddlChannelGroupname”).change(function () {

    var source = [
    “Affogato”,
    “Americano”,
    “Bicerin”,
    “Breve”,
    “Café Bombón”,
    “Café au lait”,
    “Caffé Corretto”,
    “Café Crema”,
    “Caffé Latte”,
    “Caffé macchiato”,
    “Café mélange”,
    “Coffee milk”,
    “Cafe mocha”,
    “Cappuccino”,
    “Carajillo”,
    “Cortado”,
    “Cuban espresso”,
    “Espresso”,
    “Eiskaffee”,
    “The Flat White”,
    “Frappuccino”,
    “Galao”,
    “Greek frappé coffee”,
    “Iced Coffee”,
    “Indian filter coffee”,
    “Instant coffee”,
    “Irish coffee”,
    “Liqueur coffee”
    ];
    // Create a jqxListBox
    $(“#listBoxA”).jqxListBox({ selectedIndex: 3, source: source, width: 200, height: 250 });

    });

    Listbox not getting displayed #84224

    Peter Stoev
    Keymaster

    Hi Nishchaljain,

    Same error as in your other post. Happens because of incorrectly referenced and required Javascript files.

    Regards,
    Peter

    Listbox not getting displayed #84227

    Nishchaljain
    Participant

    Hi Peter , i have mentioned the scripts files as well. I am using all those scripts files that are mentioned in the tutorial for listbox. i dont think so that i have missed out any javascrip file. Pleas help.

    Listbox not getting displayed #84228

    Peter Stoev
    Keymaster

    Hi Nishchaljain,

    The URL of the scripts could be wrong and you should check that part.

    Regards,
    Peter

    Listbox not getting displayed #84231

    Nishchaljain
    Participant

    Hi Peter ,

    The jqwidgets folder is placed in the root dierctotry so the path is correct , then what will be the problem here.

    apologies for such a silly problem but seriously dont know wheres the problem is exactly.

    Thanks.

    Listbox not getting displayed #84233

    Peter Stoev
    Keymaster

    Hi Nishchaljain,

    If the path was correct, you would not get “Uncaught TypeError: $(…).jqxListBox”. jqxListBox function is defined in jqxlistbox.js which means that you get such error, because this file is not Found. It’s not Found because it’s either missing or not referred correctly.

    Regards,
    Peter

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.