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 8733233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:36:33+00:00 2026-06-13T09:36:33+00:00

PLease i need your help, i’m trying to use jeditable to edit a field

  • 0

PLease i need your help, i’m trying to use jeditable to edit a field on a table inside {% for in %}.

editable DIV:

<td><div class="edit" id="{{ c.id }}">{{ c.name|safe }}</div></td>

jeditable code:

<script>
    $(document).ready(function(){
      $('.edit').editable('/categoryedit/{{ c.id }}/', {
        style: 'display: inline'    
        });
    });
</script>

Url:

url(r'^categoryedit/(?P<id>\d+)/$', 'pos.views.CategoryEdit'),

View:

def CategoryEdit(request, category_id):
  id = request.POST.get('category_id', '')
  value = request.POST.get('value', '')

  categoria = Category.objects.get(pk=id)
  categoria.name = value
  categoria.save()

  return HttpResponse(escape(value))
  • 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-13T09:36:34+00:00Added an answer on June 13, 2026 at 9:36 am

    Solution : The problem was that the editable DIV was inside a {% for %} bucle and in that case is needed to use .each en the Javascript like this…

    $('.edit').each(function(){
                    $('.edit').editable('/categoryedit', {
    
                    });
                });
    

    and is not necessary to pass the parameters in the url (“/category/1”) instead is better to get the parameters using …

    c_id = request.POST.get('id')
    

    the View must be like this:

    def CategoryEdit(request):
    if request.is_ajax():
        if request.method == 'POST':
            txt = request.POST.get('value')
            c_id = request.POST.get('id')
    
            categoria = Category.objects.get(pk=c_id)
    
            categoria.name = txt
    
            categoria.save()
    
            return HttpResponse(txt)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please I need your help with grabbing rows from a table and dynamic text
Please I need your help with my script. I'm trying to insert values into
I would need your help if possible please. I'm trying to deploy axcode project
Please i need your help with my script. I'm trying to post comments to
Please i need your help with how to include INDEXES in my tables, i've
please i need you help with my script.. I'm trying to echo some content
please I need your help with a Linq expression: I have nested objects with
I need your help please. I have this xml file which I need to
Great Mates... I need your help.. please let me know why this code is
I've reached the end of my Linq rope. Need your help! Heres my table

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.