fnOpenClose > fnFormatDetails load()
fnOpenClose > fnFormatDetails load()
hi,
[code]
$('#table-example tbody td .open').live('click', function () {
var nTr = this.parentNode.parentNode;
if ( this.src.match('details_close') )
{
this.src = "images/details_open.png";
oTable.fnClose( nTr );
}
else
{
this.src = "images/details_close.png";
fnFormatDetails(oTable, nTr);
}
});
function fnFormatDetails ( oTable, nTr )
{
var aData = oTable.fnGetData( nTr );
var id=aData[0];
$.ajax({
type: "POST",
url: "update_category_table.php",
data: "id="+id,
success: function(html){
oTable.fnOpen( nTr, html, 'details' );
}
});
}
[/code]
How to open fnFormatDetails (for example 1 row) without click? Using Load or Ready.
[code]
$('#table-example tbody td .open').live('click', function () {
var nTr = this.parentNode.parentNode;
if ( this.src.match('details_close') )
{
this.src = "images/details_open.png";
oTable.fnClose( nTr );
}
else
{
this.src = "images/details_close.png";
fnFormatDetails(oTable, nTr);
}
});
function fnFormatDetails ( oTable, nTr )
{
var aData = oTable.fnGetData( nTr );
var id=aData[0];
$.ajax({
type: "POST",
url: "update_category_table.php",
data: "id="+id,
success: function(html){
oTable.fnOpen( nTr, html, 'details' );
}
});
}
[/code]
How to open fnFormatDetails (for example 1 row) without click? Using Load or Ready.
This discussion has been closed.
Replies