jeditab with datatable id=null

jeditab with datatable id=null

AKraisserAKraisser Posts: 6Questions: 0Answers: 0
edited January 2011 in General
I have a problem with the id. It seems do be empty ?
The output of "print_r($_POST)" is
Array ( [value] => http://www.100artikel. [id] => [row_id] => null [column] => 1 )

The following code i have used:
[code]

$(document).ready(function() {

/* Init DataTables */
var oTable = $('#example').dataTable();

/* Apply the jEditable handlers to the table */
$('td', oTable.fnGetNodes()).editable( 'test3.php', {
"callback": function( sValue, y ) {
var aPos = oTable.fnGetPosition( this );
oTable.fnUpdate( sValue, aPos[0], aPos[1] );
},
"submitdata": function ( value, settings ) {
return {
"row_id": this.parentNode.getAttribute('id'),
"column": oTable.fnGetPosition( this )[2]
};
},
"height": "14px"
} );

} );








avzID
avzUrl
avzOvi
avzOviDatum
avzUser
avzPasswort
avzUpDate
avzFollow
avzArtBearb
avzEigenerAnkertxt
avzArtFreisch
avzArtIndex
avzAnmerkung
avzStatus



<?php do { ?>

<?php echo $row_test['avzID']; ?>
<?php echo $row_test['avzUrl']; ?>
<?php echo $row_test['avzOvi']; ?>
<?php echo $row_test['avzOviDatum']; ?>
<?php echo $row_test['avzUser']; ?>
<?php echo $row_test['avzPasswort']; ?>
<?php echo $row_test['avzUpDate']; ?>
<?php echo $row_test['avzFollow']; ?>
<?php echo $row_test['avzArtBearb']; ?>
<?php echo $row_test['avzEigenerAnkertxt']; ?>
<?php echo $row_test['avzArtFreisch']; ?>
<?php echo $row_test['avzArtIndex']; ?>
<?php echo $row_test['avzAnmerkung']; ?>
<?php echo $row_test['avzStatus']; ?>

<?php } while ($row_test = mysql_fetch_assoc($test)); ?>


[/code]

Replies

  • allanallan Posts: 63,514Questions: 1Answers: 10,472 Site admin
    You don't have an ID attribute on the row - which is why it's resulting in null. You need to either add the row id to the TR element, or just read it from the first cell in the row using standard DOM methods.

    Allan
  • AKraisserAKraisser Posts: 6Questions: 0Answers: 0
    edited January 2011
    @allan

    Thank you ! Now it works.
    But i get a second Problem. I have 300 rows in the table an it loads 90sec. How can i make it faster? Shout i use "server-side processing" ?
  • allanallan Posts: 63,514Questions: 1Answers: 10,472 Site admin
    Ouch! That's amazingly slow! Are you using IE and initialising the table in a hidden element? We've noticed before in this forum that IE is shockingly slow when dealing with elements which are hidden. 300 rows shouldn't really be an issue - 2000 is about the tipping point for switching to server-side processing (due to IE) typically.

    I'd suggest checking a Javascript profiler and resource loading (Firebug / YSlow etc) to see where the time is being taken up.

    Allan
This discussion has been closed.