jQWidgets Forums

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts

  • bindu
    Participant

    Hello Hristo,

    I don’t think the problem is at server side,because when i ran the jsp file(select-data.jsp) the flushes the sql data it resulted as below:
    [{“name”:”john”,”emailID”:”john@gmail.com”},{“name”:”janet”,”emailID”:”janet_123@gmail.com”}] .Anyway i will dig more and update you if i find any issue.


    bindu
    Participant

    That is for the document.ready(function(){ ….
    Now adding the complete code

    
    <!DOCTYPE html>
    <html>
    <head>
    <title>jqxListBox with data from a MySQL database.</title>
    <link type="text/css" rel="Stylesheet"
    	href="../jqwidgets/styles/jqx.base.css" />
    <script type="text/javascript" src="../scripts/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxdata.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">
         $(document).ready(
                function () {
             	
                    var source = {
                        dataType: "json",
                        datafields: [{ name: 'name'},{ name: 'emailID'}],
                        url:'select-data.jsp',
                        async:true
                    };
                    
                   
                    var dataAdapter = new  $.jqx.dataAdapter(source,          
                     {
                        loadComplete: function () {
                            var length = dataAdapter.records.length;
                            alert(length);},                			
                    	loadError: function (msg, status, error) {
                                    alert(msg.responseText + " Error status:" +status+ " Error is:" +error );}
                                  });
                     
                    $("#jqxListBox").jqxListBox(
                    		{ source: dataAdapter,
                    			displayMember: "name", valueMember:"emailID",width: 200, height: 250, selectedIndex:0});
    
                        });
                   
    </script>
    </head>
    <body>
    	<div id="jqxListBox"></div>
    </body>
    </html>

    No change in the output.Experiencing the same parse Error.I dont find any option to send the screenshot of the error in this forum.I am just getting a blank List box without any data

    As i told the problem is only when getting data from a jsp file.Thought the format is correct its showing up the parse error


    bindu
    Participant

    Hi Dimitar,

    Thanks for your response.It worked for me with initTabContent.Some how i missed this during my learning process.

    Regards,
    Bindu

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