开发者

jEditable - how do I get the edited textfield variable?

开发者 https://www.devze.com 2022-12-26 11:23 出处:网络
I have a table that I use jEditable with. Saving to the server works, but the callback for refreshing my table element (that I just edited and saved to the server) does not work.

I have a table that I use jEditable with.

Saving to the server works, but the callback for refreshing my table element (that I just edited and saved to the server) does not work.

    /* Apply the jEditable handlers to the table */
$('#example tbody td').editable( '<%= url_for :controller => 'impact_matrix', :action => 'post', :scenario => params[:id] %>', {
  "callback": function( sValue, y ) {
                          ^ goes missing
    var aPos = oTable.fnGetPosition( this );
    oTable.fnUpdate( sValue, aPos[0], aPos[1] );
  },
  "submitdata": function ( value, settings ) {
    temp = value
    return { "row_id": this.parentNode.getAttribute('id') };
  },

sValue (that I point to in the code) - seems to be blank.

I do get values for aPos[0] and aPos[1], but not开发者_如何学Python sValue.

Could someone please explain to me 'what triggers the callback function?'

Or, if I could just see where to get the 'newly edited text' and then just run fnUpdate() on that, I'd be fine.

Thanks in advance for your help.

0

精彩评论

暂无评论...
验证码 换一张
取 消