Multiple Tables on a page with Serverside ajax and show/hide extras
Multiple Tables on a page with Serverside ajax and show/hide extras
daveJupix
Posts: 6Questions: 0Answers: 0
Hi Everyone.
I'm having an issue with dataTables, I have 2 data tables on the page, (Seperated by tabs, but still loaded at the same time) I have included the JS code below.
The problem is that they are both fighting against each other, Portals table will display fine, but the user table will not add the TH tag one first load, then when you run the search, one will display fine, but the other will refresh and add forget the TH tag.. and so on and so forth. like an endless battle.
:(
Its doing my head in
[code]
//
// Show/hide box for users
//
function fnFormatDetails ( oTable, nTr )
{
var aData = oTable.fnGetData( nTr );
var sOut = 'Permissions:';
sOut += 'IP Restricted: '+aData[7]+'Single Login: '+aData[6]+'P3: '+aData[10]+'P4: '+aData[11]+'P5: '+aData[12]+'P6: '+aData[13]+'';
sOut += '';
return sOut;
}
//
// Show/Hide box for portals
//
function fnPortalDetails ( vTable, vTr )
{
var vData = vTable.fnGetData( vTr );
var vOut = 'Options:';
vOut += ''+vData[4]+'';
vOut += '';
return vOut;
}
$(document).ready(function() {
//
// The following is for the Users Table
//
var parts = {},
bits = location.pathname.substr(1).split('/'); // get rid of first / and split on slashes
for (var i = 0; i
I'm having an issue with dataTables, I have 2 data tables on the page, (Seperated by tabs, but still loaded at the same time) I have included the JS code below.
The problem is that they are both fighting against each other, Portals table will display fine, but the user table will not add the TH tag one first load, then when you run the search, one will display fine, but the other will refresh and add forget the TH tag.. and so on and so forth. like an endless battle.
:(
Its doing my head in
[code]
//
// Show/hide box for users
//
function fnFormatDetails ( oTable, nTr )
{
var aData = oTable.fnGetData( nTr );
var sOut = 'Permissions:';
sOut += 'IP Restricted: '+aData[7]+'Single Login: '+aData[6]+'P3: '+aData[10]+'P4: '+aData[11]+'P5: '+aData[12]+'P6: '+aData[13]+'';
sOut += '';
return sOut;
}
//
// Show/Hide box for portals
//
function fnPortalDetails ( vTable, vTr )
{
var vData = vTable.fnGetData( vTr );
var vOut = 'Options:';
vOut += ''+vData[4]+'';
vOut += '';
return vOut;
}
$(document).ready(function() {
//
// The following is for the Users Table
//
var parts = {},
bits = location.pathname.substr(1).split('/'); // get rid of first / and split on slashes
for (var i = 0; i
This discussion has been closed.
Replies