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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T13:10:39+00:00 2026-05-19T13:10:39+00:00

I am new to jQuery queues so I can use some help here. It

  • 0

I am new to jQuery queues so I can use some help here. It is hard to set up a demo page for this situation so I hope you can follow along based on my description.

I am coding inline-editing into my photo community web site. Users can click the title or description of an image and just start typing. When they exit the field or hit [enter] their value is saved. For this I am using the jEditable plugin, which is awesome.

On to the problem. It concerns error handling. The back-end script which validates the input may return with an error if the value is not valid, this error I will then catch in the errorhandler of jEditable. Such an error could be “title cannot be empty”.

What I would like to do is overwrite the title field with the error text. Next, after 3 seconds the error text will be gone and the original value before the edit is shown. I actually have this working using the following code. Note that I am only showing the relevant part:

onerror: function(settings, original, xhr) {
console.log('error');

// set error text
$("#" + original.id).html('<span class=\"error\">' + xhr.responseText + </span>').delay(3000).queue(function() {
original.reset();
});
}

As you can see, the reset of the original value is delayed for 3 seconds whilst the error text is visible. This is working fine, but only the first time. If I once again edit the resetted title and forcefully enter an invalid value again, the error text appears, but it seems the reset is never called. Through logging I have confirmed that the error handler is called the second time, yet not the reset code. Why not?

  • 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-19T13:10:39+00:00Added an answer on May 19, 2026 at 1:10 pm

    Answering my own question: It turns out I need to dequeue the reset after calling it:

    original.reset();
    $(this).dequeue();
    

    Works fine now!

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

Sidebar

Related Questions

New to javascript/jquery and having a hard time with using this or $(this) to
I'm new to jquery and asp.net so please forgive if this is an obvious
I'm new to jQuery so hopefully there is an easy answer to this. I
I am new to jQuery.just learn and use it for 3 weeks until now.
So I am pretty new to JQuery and just spent 5 hours getting this
I am relatively new to using jQuery and would like to use the load
i m adding new jquery ui tabs to a tab the sample page (click
I am having trouble learning to use the new jQuery Deferred. The does an
i'm relatively new to jquery and javascript and am trying to pass a unique
I am new to JQuery. I'm reading JQuery in action, but only up to

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.