sUpdateUrl in makeEditable() function return Alert Box instead of Updating cell (PHP)

sUpdateUrl in makeEditable() function return Alert Box instead of Updating cell (PHP)

edited December 2011 in Plug-ins Posts: 2
Having issues using the php back end. I am following your example precisely but am only getting an alert box containing the value I attempted to edit. The simple

sUpdateURL: function(value, settings) { return(value); } works fine (of course not actually changing the data source), but the echo $value return the right value but in an alert box without changing the cell value of course. Any idea what I'm doing wrong? here is some of my code:
$(document).ready(function () { $('#example2').dataTable({ "bPaginate": true, "bProcessiong":true, "bServerSide":true, "iDisplayLength": 10, "bAutoWidth": false, "sPaginationType": "four_button", "sAjaxSource": "Assets/Data/PackJSON.txt", "aoColumns": [{ "bVisible": false }, { "bVisible": false }, null, null, null, null, null, null, null], "sDom": 'Rlfrtip', }).makeEditable({ sUpdateURL: "Updates/PackUpdate.php", "aoColumns": [null, null, null, null, { indicator: 'Saving...', tooltip: 'Click to select town', loadtext: 'loading...', type: 'select', onblur: 'submit', data: "{'USPS':'USPS','UPS':'UPS','TNT':'TNT','USP2':'USP2','USP3':'USP3','USP15':'USP15','USP45':'USP45','USPS12':'USPS12'}"}, {}, {}] //add a click event to every row in the table }); }); }


  • I have the same issue. Also cant get table to update after an edit.
  • Posts: 1
    Someone managed to make it work?
  • I am the same, give the trick ?
  • Posts: 1
    i have the same problem.In updateurl what is value, settings parameters
  • edited June 2012 Posts: 1
    I fixed this today - check that there are no blank lines after your closing script tag e.g.
    <?php ...yada yada... ?> wrong - get rid of the training blank lines after the closing tag
  • edited October 2012 Posts: 1

    [...] Function should return the SAME value that is posted - any other text will be shown as an error message [...].

    post "TEST" , return "TEST"
  • edited November 2012 Posts: 1
    I have return the same submitted value in my PHP controller calss as bellow

    echo $_REQUEST['value'];

    But i still have the alert popup showing. There is a space appended to the return value

    Fix: trim the values in jquery.dataTables.editable.js on line number 150.

    if (sNewCellValue == sValue) {


    if (sNewCellValue.trim() == sValue.trim()) {
  • samarasa,

    Thank you!!! I've been banging my head into the desk for hours trying to figure this out. I wondered if it was a space situation, but didn't think about editing the datatables js. Your fix did the trick.

    Thanks again
This discussion has been closed.