Datable Undefined index: sEcho
Datable Undefined index: sEcho
weshpot
Posts: 1Questions: 0Answers: 0
Hi,
First and foremost, please kindly consider i am a novice with Jquery/java and i apologize in advance for some questions which may sound confusing.
Having said that i tried my best to solve my issue reading all threads and i could not succeed.
As mentioned in title i get this undefined index :SEcho error
I am working on localhost (127.0.0.1) wamp server and i installed datables 1.9. I activated serverside. However it seems through the debugger that no XHR were made so i am wondering what is wrong.
index.php
[code]
$(document).ready( function() {
$('#example').dataTable( {
"sDom": '<"H"lf>t<"F"ip>', //pour enlever le filtre simplement enlever le f et etc.. pour les atures.
"iDisplayLength": 4,
"aLengthMenu": [[2, 4, 8, -1], [2, 4, 8, "All"]],
"bJQueryUI": true,
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "datatable.php"
... [/code]
I have all the Pdo class code in datable.php
When i try to refresh i get this undefined sEcho problem for the table refresh
the error on the server side are (Apache log). I am doing an include of tablebottom in the index
[code] [Tue Nov 05 11:42:29 2013] [error] [client 127.0.0.1] PHP Notice: Undefined index: sEcho in D:\\wamp\\www\\website\\datatable.php on line 111
[Tue Nov 05 11:42:29 2013] [error] [client 127.0.0.1] PHP Stack trace:
[Tue Nov 05 11:42:29 2013] [error] [client 127.0.0.1] PHP 1. {main}() D:\\wamp\\www\\website\\index.php:0
[Tue Nov 05 11:42:29 2013] [error] [client 127.0.0.1] PHP 2. include() D:\\wamp\\www\\website\\index.php:67
[Tue Nov 05 11:42:29 2013] [error] [client 127.0.0.1] PHP 3. TableData->get() D:\\wamp\\www\\website\\includes\\tablebottom.php:109[/code]
Connection works fine and i get some data through the
[code] echo json_encode( $output ); [/code]
Here is the result below the table
[code] {"sEcho":0,"iTotalRecords":"9","iTotalDisplayRecords":"9","aaData":[["1","Home improvement","homeimp"],["2","Landscaping","landscaping"],["3","Ac maintenance","ac"],["4","other home impro","ohi"],["5","swimming pool","swimmingpool"],["6","clim","clim"],["7","troisiemeonglet","trois"],["8","pest machin","pestcontrol"],["9","All","All"]]} [/code]
I read that could be a 500 error but i have no idea how to solve that and how to enable XHR
Thxs for you help/assistance.
First and foremost, please kindly consider i am a novice with Jquery/java and i apologize in advance for some questions which may sound confusing.
Having said that i tried my best to solve my issue reading all threads and i could not succeed.
As mentioned in title i get this undefined index :SEcho error
I am working on localhost (127.0.0.1) wamp server and i installed datables 1.9. I activated serverside. However it seems through the debugger that no XHR were made so i am wondering what is wrong.
index.php
[code]
$(document).ready( function() {
$('#example').dataTable( {
"sDom": '<"H"lf>t<"F"ip>', //pour enlever le filtre simplement enlever le f et etc.. pour les atures.
"iDisplayLength": 4,
"aLengthMenu": [[2, 4, 8, -1], [2, 4, 8, "All"]],
"bJQueryUI": true,
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "datatable.php"
... [/code]
I have all the Pdo class code in datable.php
When i try to refresh i get this undefined sEcho problem for the table refresh
the error on the server side are (Apache log). I am doing an include of tablebottom in the index
[code] [Tue Nov 05 11:42:29 2013] [error] [client 127.0.0.1] PHP Notice: Undefined index: sEcho in D:\\wamp\\www\\website\\datatable.php on line 111
[Tue Nov 05 11:42:29 2013] [error] [client 127.0.0.1] PHP Stack trace:
[Tue Nov 05 11:42:29 2013] [error] [client 127.0.0.1] PHP 1. {main}() D:\\wamp\\www\\website\\index.php:0
[Tue Nov 05 11:42:29 2013] [error] [client 127.0.0.1] PHP 2. include() D:\\wamp\\www\\website\\index.php:67
[Tue Nov 05 11:42:29 2013] [error] [client 127.0.0.1] PHP 3. TableData->get() D:\\wamp\\www\\website\\includes\\tablebottom.php:109[/code]
Connection works fine and i get some data through the
[code] echo json_encode( $output ); [/code]
Here is the result below the table
[code] {"sEcho":0,"iTotalRecords":"9","iTotalDisplayRecords":"9","aaData":[["1","Home improvement","homeimp"],["2","Landscaping","landscaping"],["3","Ac maintenance","ac"],["4","other home impro","ohi"],["5","swimming pool","swimmingpool"],["6","clim","clim"],["7","troisiemeonglet","trois"],["8","pest machin","pestcontrol"],["9","All","All"]]} [/code]
I read that could be a 500 error but i have no idea how to solve that and how to enable XHR
Thxs for you help/assistance.
This discussion has been closed.
Replies
Allan