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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:16:51+00:00 2026-05-26T10:16:51+00:00

I am using Ruby on Rails 3.1.1 and jQueryUI 1.8.14. I would like to

  • 0

I am using Ruby on Rails 3.1.1 and jQueryUI 1.8.14. I would like to implement a jQueryUI sortable list and to save related item position changes in my application database. To implement\make that I am planning to perform an AJAX HTTP request (of course, including proper information\data in order to correctly make that effective\easy as well as possible) each time an user changes an item position.

How to perform an AJAX HTTP request when the item order changes? What data do you advice to consider\send through the AJAX HTTP request?

  • 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-26T10:16:52+00:00Added an answer on May 26, 2026 at 10:16 am

    i recently used jqueryUI sortable jquery ui sortable doc

    i use a db field called ‘order_by’ INT field.

    what you need is just to apply the jqueryUI sortable() to the elements list you want and then pass via ajax the serialized new order (check ui options for sortable, it has serialize or toArray {option}) to your controller page.

    you save the new order into db and you’ve fiished. In my case each ‘order_by’ fields is updated everytime i save the new order.

    edit

    $("#test-list").sortable({
                        cursor: 'move',
                        placeholder:'sortbale-highlight-holder',
                        tolerance:'pointer',
                        update: function() {
                        new_order = $(this).sortable("serialize");
                        somenthing_was_ordered = 1;
                    }
            });
    

    logic i used is:

    user change order and i set the new order in a global var.
    then i use a submit input to send the ajax request and save the new order.

    in
    update: function(){
    } you can launch a request anytime, cause you can return anytime the new order into an ajax call, but i preferred to save some memory for server requests 🙂

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

Sidebar

Related Questions

I am using Ruby on Rails 3.1.0 and I would like to properly generate
I am using Ruby on Rails 3.0.9 and I would like to seed the
I am using Ruby on Rails 3.1 and I would like to understand how
I am using Ruby on Rails 3.1 and I would like to know (for
I am using Ruby on Rails 3.0.7 and jQuery 1.6.1. I would like to
I am using Ruby on Rails 3.0.7 and I would like to install and
I am using Ruby on Rails 3 and I would like to retrieve a
I am using Ruby on Rails 3.0.7 and I would like to know how
I am using Ruby on Rails 3.1 and I would like to know how
I am using Ruby on Rails 3 and I would like to set some

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.