jQWidgets Forums

jQuery UI Widgets Forums Lists ListBox Unable to initialize Listbox

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  DeeCan 11 years, 11 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Unable to initialize Listbox #25144

    DeeCan
    Member

    Hi all,

    I am following the example given in the demo to create a jqxListBox, but I am unable to load/see the widget in the UI after compilation. I am using jqWidgets ver 2.7 with JQuery ver 1.8.3. Can someone help me with this ? My code is given below:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ListBoxDemo.Default" %>
    <!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 runat="server">
    <title> Split Chart </title>
    <link rel="stylesheet" href="Scripts\jqwidgets\styles\jqx.base.css" type="text/css" />
    <script src="Scripts\jquery-1.8.3.min.js" type = "text/javascript" ></script>
    <script src="Scripts\jqwidgets\jqxcore.js" type = "text/javascript" ></script>
    <script src="Scripts\jqwidgets\jqx-all.js" type = "text/javascript" ></script>
    <script src="Scripts\jqwidgets\jqxbuttons.js" type = "text/javascript" ></script>
    <script src="Scripts\jqwidgets\jqxscrollbar.js" type = "text/javascript" ></script>
    <script src="Scripts\jqwidgets\jqxlistbox.js" type = "text/javascript" ></script>
    <script src="Scripts\jqwidgets\json2.js" type = "text/javascript" ></script>
    <script src="Scripts\jqwidgets\jqxgrid.selection.js" type = "text/javascript" ></script>
    <script type="text/javascript">
    $(document).ready(function () {
    var source = ["ABC", "DEF", "GHI", "JKL"];
    $("jqxlistbox").jqxListBox({ source: source, width: '100px', height: '100px' })
    });
    </script>
    </head>
    <body>
    <form id="form2" runat="server">
    <%--<div id="Menu" style = "background-color:#F7E259; width: 150px; float: left;">--%>
    <div id="jqxlistbox"></div>
    </form>
    </body>
    </html>
    Unable to initialize Listbox #25157

    Mariya
    Participant

    Hi DeeCan,

    As far as I can see your selection of the jqxListBox is wrong. When you want to select a HTML Element by id using jQuery you should use the ‘#’ sign like this:

    $("#jqxlistbox").jqxListBox({ source: source, width: '100px', height: '100px' })
    });

    Best Wishes,
    Mariya

    jQWidgets Team
    http://www.jqwidgets.com

    Unable to initialize Listbox #25184

    DeeCan
    Member

    Thank you very much !

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

You must be logged in to reply to this topic.