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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:42:01+00:00 2026-05-14T06:42:01+00:00

I call sortable.stop() to make an ajax call to store some data after drag

  • 0

I call sortable.stop() to make an ajax call to store some data after drag & drop operation.

When the ajax call returns an error (application logic error or net problem) I want to move the dragged element to its original/start position, how can I achieve it?

The scenario should be

  1. user drags A to B
  2. the sortable.stop() event is called, it triggers an ajax call
  3. the ajax call returns an error
  4. inside the stop() event we get the ajax error
  5. move A to its original position
  6. user again move A to B
  7. everything is ok
  8. A remains in its new position in B

Steps 6-8 are shown to clarify a successive drag can be done and previous error must be forgotten.

  • 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-14T06:42:01+00:00Added an answer on May 14, 2026 at 6:42 am

    Have a look at .sortable('cancel'); something like this:

    var list = $('#some-list')
    list.sortable(
    {
        // Some options.
        stop: function()
        {
            $.post('some-url', someData, function()
            {
                if (somethingWentWrong)
                {
                    list.sortable('cancel');
                }
            });
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I make a table sortable using javascript without loading data via AJAX?
I am using Ext.data.Store to call a PHP script which returns a JSON response
I'm trying to call a function after I load some XML into Actionscript, and
I call my JavaScript function. Why do I sometimes get the error 'myFunction is
When I call socket.getsockname() on a socket object, it returns a tuple of my
I'm using jQuery to drive my AJAX UI. I have a table of data,
When I am making a call first time it shows data in my details
The call Character.isLetter(c) returns true if the character is a letter. But is there
Call me a 'n00b', but I am new to creating Script Controls. I want
I'm trying to call an Antlr task in my Ant build.xml as follows: <path

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.