jQWidgets Forums
Forum Replies Created
-
Author
-
January 27, 2016 at 2:39 pm in reply to: JSON Parse Error while loading data from SQL JSON Parse Error while loading data from SQL #80846
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.January 25, 2016 at 1:24 pm in reply to: JSON Parse Error while loading data from SQL JSON Parse Error while loading data from SQL #80743That 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
January 5, 2016 at 11:27 am in reply to: How can i load a page immediately when the tabs load for the first time How can i load a page immediately when the tabs load for the first time #80043Hi Dimitar,
Thanks for your response.It worked for me with initTabContent.Some how i missed this during my learning process.
Regards,
Bindu -
AuthorPosts