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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:46:02+00:00 2026-05-26T19:46:02+00:00

I am using jQuery Tabs for my project, with lazy loading tab content via

  • 0

I am using jQuery Tabs for my project, with “lazy” loading tab content via Ajax.

But, when I do a typo and Rails framework gives me HTTP 404 with error page, Tab will not load the page and I can’t see the error information. (Correction: Rails seems to return HTTP 500, when there is a typo in the code)

Is there a way to tell jQuery to load/display pages returned with 404 code like normal?

I’ve got this far:

$('#tabs').tabs({
    ajaxOptions: {
        error: function (xhr, status, err) {
            // Call success function - but how?
        }
    }
});
  • 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-26T19:46:03+00:00Added an answer on May 26, 2026 at 7:46 pm

    The ajaxOptions object takes the same options as the actual jQuery .ajax() method, so you can use the statusCode object to your advantage here http://api.jquery.com/jQuery.ajax/

    The example on that page for the statusCode looks like this:

    $.ajax({
      statusCode: {
        404: function() {
          alert('page not found');
        }
      }
    });
    

    To use it in the jQuery Tabs context, just pass statusCode as an object into the ajaxOptions like this:

    $('#tabs').tabs({
      ajaxOptions: {
        statusCode: {
          404: function() {
            //your 404 handling code runs here
          } 
        }
      }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using jquery-ui tabs and ajax to load the content of the tabs.
I am using jquery UI tabs and content loaded into the tab is on
I'm using jQuery UI tabs for a project with the AJAX approach. When you
I have a set of jQuery UI tabs that each load project.php using ajax.
I am using jQuery tabs but when I click a tab, the hash doesnt
I am using jquery UI tabs I have three ajax tabs like so: <div
Im using jquery UI's tabs with ajax. I was wondering if the files that
I have some tabs using jQuery UI which work just fine, but I want
I am using jQuery Tools Slideshow & Tabs for a project I am working
I am using jquery UI tab for my project. Kindly check the html code

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.