Seach Box
Seach Box
redhookbaker
Posts: 31Questions: 0Answers: 0
Hi,
I am using ajax to display the table.
When I use
"sDom": 't<"top"lp<"clear">>frt<"bottom"ip<"clear">>',
it does not work. When I use Java Array, it works fine. Thank you
I am using ajax to display the table.
When I use
"sDom": 't<"top"lp<"clear">>frt<"bottom"ip<"clear">>',
it does not work. When I use Java Array, it works fine. Thank you
This discussion has been closed.
Replies
Allan
Allan
Thanks for the reply.
Strangely, it did not show me any error. I am not sure if it has anything to do with the following code I use. thanks
a
b
c
d
Final e
Anyway, did removing the first or second 't' fix the issue?
Allan
$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sDom": 't<"top"lp<"clear">>frt<"bottom"ip<"clear">>',
"sPaginationType": "full_numbers",
"bStateSave": true,
"sAjaxSource": server_processing.asp"
"fnServerData": function ( sSource, aoData, fnCallback ) {
aoData.push( { "name": "parm", "value": "<%=Nbr%>" } );
$.getJSON( sSource, aoData, function (json) {
fnCallback(json)
} );
}
} );
} );
"sAjaxSource": server_processing.asp"
[/code]
There is a syntax error there. It's missing a quote mark - which should be giving a JS error really. This seems to work fine for me:
[code]
$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sDom": 't<"top"lp<"clear">>frt<"bottom"ip<"clear">>',
"sPaginationType": "full_numbers",
"bStateSave": true,
"sAjaxSource": "../examples_support/server_processing.php",
"fnServerData": function ( sSource, aoData, fnCallback ) {
aoData.push( { "name": "parm", "value": "<%=Nbr%>" } );
$.getJSON( sSource, aoData, function (json) {
fnCallback(json)
} );
}
} );
} );
[/code]
The search box is outside of the 'top' div, but that's what sDom says it should do.
Allan
http://datatables.net/usage/options#sDom
except f, which is for the search input...strange..any ideas? thanks
Allan