Ajax Get Request
Ajax Get Request
Hi, I would like to use an ajax datasource but sent to a php script which will return a json object to populate the table with. However I don't want to go through the whole process of using full on server-side processing as I don't feel it's necessary for my solution (it's only a dinky database) so basically I'd just like to know what I can use to catch the get request with my php
( i.e
if(isset($_GET['datatables']))
{ **build my json** }
If anyone could provide me with that, it would be very much appreciated, thanks :)
( i.e
if(isset($_GET['datatables']))
{ **build my json** }
If anyone could provide me with that, it would be very much appreciated, thanks :)
This discussion has been closed.
Replies
such as:
$_GET['*what goes here*'];
Thanks for replying
That shouldn't be needed though - DataTables can consume virtually any JSON data source: http://datatables.net/blog/Extended_data_source_options_with_DataTables
Allan
In your sAjaxSource you could set it up as 'http://yourserver/yourphp.php?datatable=true' or something like that. Then check $_GET['datatable']. I think that would work but I haven't tried it.
Still better if you can avoid needing to do that thought...
Allan
Thanks by the way for the quick replies, very much appreciated!