Help! when I do the document.write (nTr) it comes back blank...
Help! when I do the document.write (nTr) it comes back blank...
I know that it can tell when it gets clicked on so it got into this function and then dies because nTr is blank. Any help would be much appreciated.
$('#results tbody td img').live('click', function () {
var nTr = $(this).parents('tr')[0];
document.write (nTr);
if ( oTable.fnIsOpen(nTr) )
{
document.write("open");
/* This row is already open - close it */
this.src = "images/details_open.png";
oTable.fnClose( nTr );
}
else
{
document.write("closed");
/* Open this row */
this.src = "images/details_closed.png";
oTable.fnOpen( nTr, fnFormatDetails(oTable, nTr), 'details' );
}
} );
$('#results tbody td img').live('click', function () {
var nTr = $(this).parents('tr')[0];
document.write (nTr);
if ( oTable.fnIsOpen(nTr) )
{
document.write("open");
/* This row is already open - close it */
this.src = "images/details_open.png";
oTable.fnClose( nTr );
}
else
{
document.write("closed");
/* Open this row */
this.src = "images/details_closed.png";
oTable.fnOpen( nTr, fnFormatDetails(oTable, nTr), 'details' );
}
} );
This discussion has been closed.
Replies