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

  • Home
  • SEARCH
  • 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 6818063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:07:50+00:00 2026-05-26T21:07:50+00:00

I am using JEditable jquery plugin to update some data on my webpage. After

  • 0

I am using JEditable jquery plugin to update some data on my webpage. After the data is saved through the JEditable plugin on the server, I want to replace the old content in the container div with the new one which is actually different than the inserted data (application processed the data before saving it and adds some more information with it).

I have tried the below code to do the same, it works for the first time but once the data is replaced in the container div, the editable functionality is lost.

$(".editableComments").editable( function(value, settings) {
            selectedId = $(this).attr("id");
            $.ajax({
                url:'ajaxApproveRequests',
                type:'post',
                data:{
                        requestType: "Trans",
                        idList : $(this).attr("id"),
                        comment:  value
                    },
                success: function(data) {
                    if (data != "Error")
                        {
                            $("#"+selectedId).html(data);
                        }
                },
                error: function(req) {
                    alert("Error in request. Please try again later.");
                }
            });
        },
        {
            indicator : "Saving...",
            type   : 'textarea',
            submit : '<input type="button" id="okBtn" value="Ok" onMouseOver="rollOnAutoButton(this)" onMouseOut="rollOffAutoButton(this)" class="autobtn" >',
            cancel : '<input type="button" id="cancelBtn"  value="Cancel" onMouseOver="rollOnAutoButton(this)" onMouseOut="rollOffAutoButton(this)" class="autobtn" >',
            cssclass : "editableArea",
            rows: 5,
            cols: 25,
            onblur    : "ignore"
        }); 

The Html code is:

<div class="editableComments">some data</div>

Please suggest where am I doing wron? Thanks in advance.

  • 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-05-26T21:07:50+00:00Added an answer on May 26, 2026 at 9:07 pm

    The editable function needs a return value. and you cannot get one with an ajax function.

    What I do is that I return some temporary value there in the meantime whilst I do my ajax function:

       $(".editableComments").editable( function(value, settings) {
            selectedId = $(this).attr("id");
            $.ajax({
                url:'ajaxApproveRequests',
                type:'post',
                data:{
                        requestType: "Trans",
                        idList : $(this).attr("id"),
                        comment:  value
                    },
                success: function(data) {
                    if (data != "Error")
                        {
                            $("#"+selectedId).html(data);
                        }
                },
                error: function(req) {
                    alert("Error in request. Please try again later.");
                }
            });
            return value; //need the return
        }, ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm submitting data using the jQuery plugin 'Jeditable' and that part is working fine.
Using jQuery plugin jEditable. Problem I'm having is that I want whatever is editable
I have been using the JEditable plugin for JQuery and I would like to
I'm using the excellent jEditable plugin for some in-place editing on my page. There
Using jeditable jQuery plugin along with the timepicker plugin. (custom inputs Time Picker 2
Im using the jeditable jquery plugin. i have multiple separate ediatable areas, so when
Using Flask Flask-sqlalchemy Sqlalchemy Jquery Datatables (jquery plugin) Jeditable (jquery plugin) Consider this user
I'm using the Edit-in-Place JQuery plugin, JEditable: http://www.appelsiini.net/projects/jeditable . I would like to use
I'm using the jQuery jEditable plug-in to edit some part of a website. As
I am using jQuery DataTables and doing server-side data. I'm trying to call a

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.