Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8826027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:01:20+00:00 2026-06-14T07:01:20+00:00

I have a Datatable created, and I’m using jeditable plugin to edit cells to

  • 0

I have a Datatable created, and I’m using jeditable plugin to edit cells to push back data. I can edit the cells but when I hit enter and it sends back to my URL Rest endpoint (which I just have a System.out.println to see the data) I get this error from firebug

“NetworkError: 415 Unsupported Media Type – my rest endpoint url“

My endpoint is expecting an Object in JSON, jeditable is only sending some string parameters. So I need to wrap it up.
Let me post my datatable initialization along with jeditable init.

var computerTable = $("#table_computerTable ").dataTable({
           "bProcessing": true,
           "bServerSide": true,
           "bInfo":false,
           "bAutoWidth":false,
           "bScrollInfinite":true,
           "sAjaxSource": ApiUrl(),
           "aoColumns":[       // Maps <th> elements in html to JSON data
               {"mData": "id"},
               {"mData": "description","sClass" : "read_only"},
               {"mData": "serial"},
               {"mData": "daily"}
             ],
           "aoColumnDefs":[
               {"sName":"id","bVisible":false, "aTargets": [0]},
               {"sWidth": "55%","aTargets": [1]},
               {"sName":"serial","bVisible":false, "aTargets": [2]},
               {"sName":"daily","aTargets":[3]}
             ],
            "fnServerData": function ( sSource, aoData, fnCallback ) {
                   $.getJSON( sSource, aoData, function (json) { 
                       map = {};
                       map["aaData"] = json;
                       fnCallback(map);
                   });
            },
            "fnRowCallback": function(nRow, aData, iDisplayIndex ){
                $(nRow).attr("id",aData["id"]); // Change row ID attribute to match database row id
                return nRow;
            }
        }).makeEditable({
            sUpdateURL: getApiUrl() + "cpu/save",
            sReadOnlyCellClass: "read_only",
            ajaxoptions:{
                dataType: "json",
                type: 'POST'
            }
        });

This is the data I get back when I send the POST (read from firebug)

columnId    3
columnName  daily
columnPosition  2
id  24
rowId   0
value   50

What I would like to do is initialize an object and send back all the data I want in that. The ID / Serial / Hourly(the new value)

I don’t know enough jquery, javascript to know where to begin with that modification.

Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T07:01:21+00:00Added an answer on June 14, 2026 at 7:01 am

    Edit your makeEditable like this:

    makeEditable(
    {
      sUpdateURL: function(value, settings)
      {
        var sentObject = {}
        var rowId = oTable.fnGetPosition(this)[0];
        var columnPosition = oTable.fnGetPosition(this)[1];
        var columnId = oTable.fnGetPosition(this)[2];
        var sColumnTitle = oTable.fnSettings().aoColumns[columnId].sTitle; 
        sentObject["rowid"]= rowId
        sentObject["columnpos"]= columnPosition
        sentObject["columnId"]= columnId
        sentObject["sColumnName"]= sColumnTitle
        sentObject["valueOfCell"]=value
        sentObject["Serial"]="serialnumber"
        sentObject["Hourly"]="somevalue"
        $.ajax({
        type: "POST",
        url: "url",
        data: "sentObj="+JSON.stringify(sentObject)
        })
        return value;
      },
      sSuccessResponse: "IGNORE"
     }
    );
    

    It’s like an own customization of ajax request for updating a cell.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a DataTable that I manually created and loaded with data using C#.
I have created a datatable and trying to insert that datatable through SqlBulkCopy but
I have created a method that can be called using a stored procedure name
I have a datatable created in C#. using (DataTable dt = new DataTable()) {
I have an already created DataTable object which i am using for my girdview
I have created a DataTable that I fill using a SQL query that has
I have created a page using JSF 2.0. Below is what I have <h:dataTable
I have created the following custom task for Cruise Control .net, but I can't
I have a strongly typed DataTable created with the VS2005/VS2008 DataSet designer. The table
I have a GridView to which I bind a dataTable that I manually created.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.