Server side processing....
Server side processing....
can someone post the html file for displaying the server data....
because I don't get any error nor any data in the table....
I used the server processing code from here and it doesn't display anything.....
can someone help me out?
Can I get any help with the javascript debugging... i'm new to javascript ... I don't know how to track down where the problem is occuring...
thanks in advance for the help....
because I don't get any error nor any data in the table....
I used the server processing code from here and it doesn't display anything.....
can someone help me out?
Can I get any help with the javascript debugging... i'm new to javascript ... I don't know how to track down where the problem is occuring...
thanks in advance for the help....
This discussion has been closed.
Replies
Allan
Could someone help me through with the debugging in firebug ? I have it installed but I'm just starting with the ajax (javascript) part and I don't realy know where to look...
Could someone walk me through step by step?
thanks in advance....
Maybe an online tutorial?
This should go without saying.. but you need to host the JSON file on your machine (change sAjaxSource)..
[code]
$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": true,
"sAjaxSource": '../examples_support/json_source.txt'
} );
} );
[/code]
Ok, but I don't see where I have to find the html code in there examples... only the insert of the javascript...
where do I find the source of the table?
What are the important things I have to look for to make this work?
How can I track if he finds the datasource? Lets say when I change intentionally the datasource file name...
I will answer your questions however if you'd like to continue on the path of figuring out datatables, although after a few chapters of a JavaScript book this would make much more sense.
The code snippet I posted is looking for an html table one that's id is "example", the jquery $('#example') to be exact. So that means you must have an html table, you also need to define the headings, the simpliest approach is to do a "view source" on Allans example page. You'll see his table looks like:
[code]
Rendering engine
Browser
Platform(s)
Engine version
CSS grade
Rendering engine
Browser
Platform(s)
Engine version
CSS grade
[/code]
Import your JavaScript JQuery libraries and the datatables library
[code]
[/code]
Remember to put that JavaScript snippet I posted previously in your head section.. change the json_source.txt to the correct location. You may download it from: http://datatables.net/examples/examples_support/json_source.txt
[code]
$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": true,
"sAjaxSource": '../examples_support/json_source.txt'
} );
} );
[/code]
I can't stress enough.. get Allan's example working FIRST. Copy the code from his example page and start there. I've walked you through everything.. that's about all that can be done.
Works! thanks for the help... my custom server-side script works........! But still weird... debugged it in IE instead of firefox.... kinda problem with my firefox that put me on the wrong track when debugging....