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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:53:03+00:00 2026-05-26T00:53:03+00:00

I have my jQuery UI Tabs working right now but need help implementing the

  • 0

I have my jQuery UI Tabs working right now but need help implementing the Ajax side. What I need help with is getting #tab-2 to show information (@user.messages) from the MessagesController in a layout that exists as a partial in the MessagesController.

My application.js:

$(function() {
    $( "#tabs" ).tabs({
        ajaxOptions: {
            error: function( xhr, status, index, anchor ) {
                $( anchor.hash ).html(
                    "Couldn't load this tab. We'll try to fix this as soon as possible. " +
                    "If this wouldn't be a demo." );
            }
        }
    });
});

My profile show.html.erb:

<div id="tabs">
  <ul id="infoContainer">
    <li><a href="#tabs-1">About</a></li>
    <li><%= link_to "Messages", "messages/profile_messages", :remote => true %></li>
  </ul>
  <div id="tabs-1">
  </div><!-- end profile-about -->
</div>

My _profile_messages partial in MessagesController:

<div id="tabs-2">
    <% for 'message' in @user.messages %>
        <div class="message">
        </div>
    <% end %>
</div>

Here is the HTML output of the jQuery UI Tabs:

<div id="tabs">
  <ul id="infoContainer">
    <li><a href="#tabs-1">About</a></li>
    <li><a href="messages/profile_messages" data-remote="true">Messages</a></li>
  </ul>
<div id="tabs-1">

Here are the tabs as seen in Firebug:

<div id="tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
  <ul id="infoContainer" class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
    <li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><a href="#tabs-1">About</a></li>
    <li class="ui-state-default ui-corner-top"><a href="#ui-tabs-1" data-remote="true">Messages</a></li>
  </ul>
  <div id="tabs-1" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
  </div>
</div>

The fact that Firebug shows the second link as #ui-tabs-1 seems odd to me. Then when I click the “Messages” link to load the @user.messages, Firebug shows an error Failed to load resource: the server responded with a status of 404 (Not Found) - :3000/profiles/messages/profile_messages.

  • 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-26T00:53:04+00:00Added an answer on May 26, 2026 at 12:53 am

    Thanks to the combined efforts of folks here on SO I was able to get this to work. Check out these questions for more code:

    Exclude application layout in Rails 3 div

    Rails 3 jQuery UI Tabs issue loading with Ajax

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

Sidebar

Related Questions

I have my jQuery UI Tabs working right now but need help implementing the
I have used jquery tabs for loading data with ajax, but I need to
I have this jQuery ajax navigation tabs plugin that I created using some help
im working on a site and i have making a jquery tab but i
I am using jquery UI tabs I have three ajax tabs like so: <div
I have some tabs using jQuery UI which work just fine, but I want
Suppose i have some tabs (e.g. jquery tab) and I want to dynamically load
I'm working on a website with Jquery tabs dynamically generated. Each tab has an
I am using jquery UI tabs and working pretty well and now I want
I have a jquery slider which is working good in Firefox and Chrome. But

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.