Getting modified data to the server (jEditable) from DataTable

Getting modified data to the server (jEditable) from DataTable

javahollicjavahollic Posts: 11Questions: 0Answers: 0
edited February 2010 in General
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

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi andy,

    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
  • javahollicjavahollic Posts: 11Questions: 0Answers: 0
    Bah, sometimes I'm such a noob :/ everything was correct except for one small detail... I was only handling doGet on the server end Xo So, yea, handle doPost and all is shiny. Woohoo!
This discussion has been closed.