Getting modified data to the server (jEditable) from DataTable
Getting modified data to the server (jEditable) from DataTable
javahollic
Posts: 11Questions: 0Answers: 0
Hi all,
I have the DataTable side of things done and dusted; dynamically loaded JSON, dynamically add/remove rows from the browser reflected in persisted state - awesome, now I just need to be able to save modified values.
I have jEditable in and 'running', I pickup a click on certain elements, and generate a combo of values, when I hit OK, I drop into the 'submitdata' function and pull out the row Idx, which is correct, BUT NO post ever occurs, and no javascript errors are occurring.
I'm sure there is something stupid I'm not seeing, any advice? Here is the jEditable bit Im using
[code]
//add priority select
$(".col4_editable").editable('$SERVLET_PREFIX/plugins/servlet/zzzzzzzzzzz?command=', {
data : "{ $action.generatePriorityValueSetString() }",
type : "select",
submit : "OK",
tooltip : "Double click to edit",
event : "dblclick",
style : "inherit",
submitdata : function() {
var idx = oTable.fnGetPosition( this )[0];
alert("col4: going to submit id :"+idx);
return { _method : "post",
row_id : idx };
}
} );
[/code]
Thanks!
andy
I have the DataTable side of things done and dusted; dynamically loaded JSON, dynamically add/remove rows from the browser reflected in persisted state - awesome, now I just need to be able to save modified values.
I have jEditable in and 'running', I pickup a click on certain elements, and generate a combo of values, when I hit OK, I drop into the 'submitdata' function and pull out the row Idx, which is correct, BUT NO post ever occurs, and no javascript errors are occurring.
I'm sure there is something stupid I'm not seeing, any advice? Here is the jEditable bit Im using
[code]
//add priority select
$(".col4_editable").editable('$SERVLET_PREFIX/plugins/servlet/zzzzzzzzzzz?command=', {
data : "{ $action.generatePriorityValueSetString() }",
type : "select",
submit : "OK",
tooltip : "Double click to edit",
event : "dblclick",
style : "inherit",
submitdata : function() {
var idx = oTable.fnGetPosition( this )[0];
alert("col4: going to submit id :"+idx);
return { _method : "post",
row_id : idx };
}
} );
[/code]
Thanks!
andy
This discussion has been closed.
Replies
If you take DataTables out - do you still get this problem (you might need to put in a dump value for the fnGetPosition return!)? I'm afraid I'm no export on jEditable, so it might be better to ask their support (assuming it's not a DataTables issue!).
Regards,
Allan