sUpdateuRL not receiving URL parameters...

sUpdateuRL not receiving URL parameters...

danzdanz Posts: 2Questions: 0Answers: 0
edited October 2011 in DataTables 1.8
Hi, I am another jQuery/JEditable newbe...

I am using Lua for server side scripting.
I am able to get the table parameters for Add and Delete, but not for Update.
I have added id's to by tags, but still no URL data for update.
Also, I needed to change the HttpMethods to "GET" in order for my Add and Delete URLs to work.
I did the same for Update, but I still don't get any URL parameters. in the Update URL.
Any idea's?

$('#example').dataTable().makeEditable({
sAddHttpMethod: "GET",
sDeleteHttpMethod: "GET",
sUpdateHttpMethod: "GET",
sAddURL: "<?print(add_url)?>",
sDeleteURL: "<?print(delete_url)?>",
sUpdateURL: "<?print(update_url)?>",
sAddDeleteToolbarSelector: ".dataTables_length" });

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    edited October 2011
    in addition to the your settings there, you also need to pass in an initialization object for your columns (if you don't, or for any 'null' you set for a column, that column will not be made editable)

    as in the example below, you can send { } (empty object, see line 11) to get the defaults, or specify values yourself.

    [code]
    $('#example').dataTable().makeEditable({
    sAddHttpMethod: "GET",
    sDeleteHttpMethod: "GET",
    sUpdateHttpMethod: "GET",
    sAddURL: "<?print(add_url)?>",
    sDeleteURL: "<?print(delete_url)?>",
    sUpdateURL: "<?print(update_url)?>",
    sAddDeleteToolbarSelector: ".dataTables_length",
    aoColumns { [
    null,
    {
    },
    {
    indicator: 'Saving platforms...',
    tooltip: 'Click to edit platforms',
    type: 'textarea',
    submit: 'Save changes'
    },
    {
    type: 'select',
    onblur: 'cancel',
    submit: 'Ok',
    loadurl: 'EngineVersionList.php',
    loadtype: 'GET'
    },
    {
    type: 'select',
    onblur: 'submit',
    data: "{'':'Please select...', 'A':'A','B':'B','C':'C'}"
    }

    ]
    });

    [/code]


    the types of stuff you can put into those init objects are (afaik) anything you would put into jEditable:
    http://www.appelsiini.net/projects/jeditable

    I've never been thrilled with the documentation on the jeditable page. I think you'll get more out of the datatables editable plugin page: http://code.google.com/p/jquery-datatables-editable/wiki/CustomCellEditors (I copied the example aoColumns above from this page)
  • danzdanz Posts: 2Questions: 0Answers: 0
    Hi fbas;
    Thanks for your comments.

    I did find a solution to my problem.
    It was server side for Lighttpd.

    thanks!
This discussion has been closed.