DataTable IFRAME fnClose
DataTable IFRAME fnClose
Hi,
i had two files.
First with DataTable and iframe
file1.html
[code]
function fnFormatDetails ( oTable, nTr )
{
var aData = oTable.fnGetData( nTr );
var sOut = '';
return sOut;
}
...
$(document).ready(function() {var oTable = $('#example').dataTable( {
...
$('#example tbody td img').live('click', function () {
var nTr = this.parentNode.parentNode;
if ( this.src.match('details_close') )
{
/* This row is already open - close it */
this.src = "open.png";
oTable.fnClose( nTr );
} else {
/* Open this row */
this.src = "close.png";
oTable.fnOpen( nTr, fnFormatDetails(oTable, nTr), 'details' );
}
} );
...
...
[/code]
In file2.html I would like to have a link for open or close chosen table row.
How to do it?
I tried "parent.oTable" but it do not work. :(
tnx
i had two files.
First with DataTable and iframe
file1.html
[code]
function fnFormatDetails ( oTable, nTr )
{
var aData = oTable.fnGetData( nTr );
var sOut = '';
return sOut;
}
...
$(document).ready(function() {var oTable = $('#example').dataTable( {
...
$('#example tbody td img').live('click', function () {
var nTr = this.parentNode.parentNode;
if ( this.src.match('details_close') )
{
/* This row is already open - close it */
this.src = "open.png";
oTable.fnClose( nTr );
} else {
/* Open this row */
this.src = "close.png";
oTable.fnOpen( nTr, fnFormatDetails(oTable, nTr), 'details' );
}
} );
...
...
[/code]
In file2.html I would like to have a link for open or close chosen table row.
How to do it?
I tried "parent.oTable" but it do not work. :(
tnx
This discussion has been closed.