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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:10:23+00:00 2026-06-15T11:10:23+00:00

I got a issue like this: I am using Rails 3.2.9 and jqueryUI 1.9.0

  • 0

I got a issue like this:
I am using Rails 3.2.9 and jqueryUI 1.9.0
I had a tabs UI and use ajax for each tab.
the html and Javascript code is like this:

<!-- index.html.erb -->
<div id="tabs">
  <ul>
    <li><a href="home/page1">page1</a></li>
    <li><a href="home/page2">page2</a></li>
  </ul>
</div>

<!-- page1.html.erb-->
<p>this is page 1</p>

<!-- page2.html.erb-->
<p>this is page 2</p>

and in home.js:

$(document).ready(function () {
  $( "#tabs" ).tabs();
});

so, when I start the server, and try to activate any tab, the front end will keeping send the requests back to server. does any one know what happened on this?

Thank you


Update

I change the home.js like this but still doesn’t work:

$(document).ready(function () {
  $( "#tabs" ).tabs({
    beforeLoad: function( event, ui ) {
      if ( ui.tab.data( "loaded" ) ) {
      event.preventDefault();
      return;
      }

      ui.jqXHR.success(function() {
        ui.tab.data( "loaded", true );
      });
    }
  });
});

I still can not find the reason why this happened. A big thank you if some one can figure it out.
Thank you!

  • 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-06-15T11:10:24+00:00Added an answer on June 15, 2026 at 11:10 am

    Because you specify home/page1 and home/page2 in your href links, it will load them up each time you click on the relevant tab.

    Instead you can load the pages up once in index.html.erb by rendering partials into your page. If you rename page1.html.erb to _page1.html.erb and page2.html.erb to _page2.html.erb you can change your code to:

    <div id="tabs">
        <ul>
            <li><a href="#page1">Page 1</a></li>
            <li><a href="#page2">Page 2</a></li>
        </ul>
        <div id="page1">
             <%= render 'home/page1' %>
        </div>
        <div id="page2">
             <%= render 'home/page2' %>
        </div>
    </div>
    

    Edit

    If you still want to load the pages dynamically when you click each tab but only once, then don’t use partials – you can just use the cache option:

     $( "#tabs" ).tabs({ 
                cache: true 
                //some other options 
      });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got an issue. The scenario is like this: I got an NSOperationQueue that
I got this issue, In the above html I cannot click on the dropdown
I got very typical issue. My dynamically generated query like this... UPDATE Templates t
I think I've got the same issue like this guy , but I wasn't
I've got a set of checkboxes I would like to position using CSS. This
I've got a weird issue that almost seems like a Visual Studio 2008 issue.
recently got an issue when loading vs 2008, it displays this... can anyone tell
I've got an issue where strtotime returns my afternoon times as 0. This is
So I've got this issue with forms generated by Zend Framework. As we know
I have got an unorderlist generated programatically using code behind, The html markup is

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.