jEditable pass content in id
jEditable pass content in id
Hello all,
I'm currently using jEditable for editing a table and post. I'm aware of the two parameters we can submit (id and value) and also add new ones with "submitdata".
However, my purpose is fill in the id parameter with the content of another cell of the same row. I just need send a id and a value, but I cannot either get send this id modified nor id with content. I have read about http://www.datatables.net/forums/discussion/1205/putting-id-into-for-jeditable/p1 but not success.
I'm getting confused and worried about whether it's possible or not.
[code]
"fnDrawCallback": function () {
$('td.Channel').editable( 'https://localhost/updateData', {
"id" : 'id',
"name" : 'value',
"tooltip" : 'Click to edit...',
"callback" : function( sValue, y ) {
console.log(this);
var aPos = oTable.fnGetPosition( this );
oTable.fnUpdate( sValue, aPos[0], aPos[1] );
/* Redraw the table from the new data on the server */
oTable.fnDraw();
},
"submitdata" :function (value, settings) {
return {
//"MacAddBb": MacAddrBb,
"row_id": this.parentNode.getAttribute('id'),
"column": oTable.fnGetPosition( this )[2]
};
},
"height": "14px",
} );
}
[/code]
Thanks in advance, hope I have explained myself.
Looking forward to some hints about.
I'm currently using jEditable for editing a table and post. I'm aware of the two parameters we can submit (id and value) and also add new ones with "submitdata".
However, my purpose is fill in the id parameter with the content of another cell of the same row. I just need send a id and a value, but I cannot either get send this id modified nor id with content. I have read about http://www.datatables.net/forums/discussion/1205/putting-id-into-for-jeditable/p1 but not success.
I'm getting confused and worried about whether it's possible or not.
[code]
"fnDrawCallback": function () {
$('td.Channel').editable( 'https://localhost/updateData', {
"id" : 'id',
"name" : 'value',
"tooltip" : 'Click to edit...',
"callback" : function( sValue, y ) {
console.log(this);
var aPos = oTable.fnGetPosition( this );
oTable.fnUpdate( sValue, aPos[0], aPos[1] );
/* Redraw the table from the new data on the server */
oTable.fnDraw();
},
"submitdata" :function (value, settings) {
return {
//"MacAddBb": MacAddrBb,
"row_id": this.parentNode.getAttribute('id'),
"column": oTable.fnGetPosition( this )[2]
};
},
"height": "14px",
} );
}
[/code]
Thanks in advance, hope I have explained myself.
Looking forward to some hints about.
This discussion has been closed.