Server Processing Display
Server Processing Display
I will fully admit to being a full newbie at this but for some reason I cannot get my data from my database to display using the datatable format. I have edited the server_processing.php with everything, have the initialization in my index file but the page is coming up with just my table info. I think what's hanging me up is what to put here:
[code]"fnServerData": ... /* Include function source from plug-in */[/code]
[code]"fnServerData": ... /* Include function source from plug-in */[/code]
This discussion has been closed.
Replies
Here is my debug
Here is the site:
http://rpwith.us/Test2/
[code],["_-Cheeky Chobit-_ & Perky Persocom","Joseph","M","1","","Alicorn","Halloween '08 - Gaia EI - Angel Imp","Chibizoo","Tag<\/a>","","",""][/code]
Viewing the source of your test case page the table doesn't finish, there's no and no , both of which are required for DataTables (see http://datatables.net/usage/).
Also the table doesn't finish properly, no end , this may because of the malformed json.
Get those sorted and see what happens.
Steph
Plus what Steph says :-)
Allan
I'm not sure why it's showing that strange html in there - the ahref HTML I'm seeing within the sql table is displaying perfectly normal. I need the Tag row to have clickable info. (I'm not lying when I say I'm a newbie, but I'm trying really hard to learn).
I've removed the call for the Tag column where the link html was, and it made no difference.
Allan - I'd like to use server-side processing because I've got over 7,000 rows of data, and add more to it every day due to the nature of the site I'm using it for. Right now I have it reading in a php table from the sql database. I did it that way because it was turning up a blank page before I put in any table info.
So basically, what do I need for server-side processing to work?
If you look at the javascript console you also have an error:
XMLHttpRequest cannot load http://www.rpwith.us/Test2/DataTables/scripts/server_processing.php?sEcho=1…=true&bSortable_9=true&bSortable_10=true&bSortable_11=true&_=1360586793433. Origin http://rpwith.us is not allowed by Access-Control-Allow-Origin.
That's why the processing display never disappears.
Steph
You have 2 errors to sort out - one is that you are sending the headers twice though this doesn't affect DataTables, the second is that your table is set up for 12 columns but you are only returning 8 in the json output of your php script.
Steph
It does seem to lag a little bit, though. I'm not sure if it's because I didn't set up server side correctly and it's using a regular script, or if it's just slow on 7k data rows even with server processing.