Datatable into a tab and AJAX

Datatable into a tab and AJAX

tombaltombal Posts: 1Questions: 0Answers: 0
edited May 2010 in General
Hello,

I'm using Jquery tools tab. In the content loaded by AJAX, i want to display datatable (using sAjaxSource) but nothing is displayed.

Do i have to add something in the code to make it work ??

FOR TAB
[code]


<!-- the tabs -->

Tournois > Resultats


<!-- tab "panes" -->






<!-- This JavaScript snippet activates those tabs -->



$(function() {

$("ul.tabs").tabs("div.panes > div", {

effect: 'fade',

onBeforeClick: function(event, i) {

// get the pane to be opened
var pane = this.getPanes().eq(i);

// only load once. remove the if ( ... ){ } clause if you want the page to be loaded every time
if (pane.is(":empty")) {

// load it with a page specified in the tab's href attribute
pane.load(this.getTabs().eq(i).attr("href"));
}

}
});
});

[/code]

tab_result.asp
[code]


$(document).ready(function() {

oTable = $('#resultats').dataTable({
"bProcessing": true,
"bInfo": true,
"bFilter": false,
"bServerSide": true,
"sAjaxSource": "js_resultats.asp?id_entite=<%=request("id_entite")%>",
"aaSorting": [[ 2, "desc" ]],
"aoColumns": [
{ "sType": "html" },
null,
null,
null,
null
],
"bJQueryUI": true,
"bSort":true,
"iDisplayLength": 25,
"sPaginationType": "full_numbers"
});
} );






Comp
This discussion has been closed.