Passing Column Name to Server Side

Passing Column Name to Server Side

LechlakLechlak Posts: 3Questions: 0Answers: 0
edited February 2011 in General
Hello All,

I feel rather dumb for asking this. I want to pass a server side value, the column name. I followed the instructions and I can pass the row and the column number, but not the name. I need this to update my MySQL db, but it is dynamic so a number won't help me unless I can run a query that finds all the headers and returns them.

fnColumnToField() - I had no idea how to use this.

[code]

$(document).ready(function() {
$('#example').dataTable( {
"sPaginationType": "full_numbers",
"sScrollX": "100%",
"sScrollXInner": "300%",
"bScrollCollapse": true
} );
/* Init DataTables */
var oTable = $('#example').dataTable();

/* Apply the jEditable handlers to the table */
$('td', oTable.fnGetNodes()).editable( 'echo/index.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],
"sName": oTable.fnColumnToField( 'column' ), -- It wont even run if i add this but this helps explain my side better i think
};
},
"height": "20px"
} );
} );


[/code]

Replies

  • LechlakLechlak Posts: 3Questions: 0Answers: 0
    Well shoot - I was hoping it was simple enough. I know money talks, but I don't want to invest money if its not possible.
  • LechlakLechlak Posts: 3Questions: 0Answers: 0
    I got a solution here

    http://forums.mysql.com/read.php?52,365826,365826

    Good luck world.
This discussion has been closed.