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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:33:46+00:00 2026-05-19T11:33:46+00:00

Say I have a list of users in the left column, generated by <%=

  • 0

Say I have a list of users in the left column, generated by <%= current_user.clients %> and the second column is empty by default.

However, when the user clicks on one of the links, the second column becomes populated with the projects associated with that user – without the entire page being reloaded (i.e. using AJAX).

I would also like to continue the process, so when they click on a project from that user, the third column is populated with other things (e.g. the name of images, etc.).

How do I accomplish this in Rails?

  • 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-19T11:33:47+00:00Added an answer on May 19, 2026 at 11:33 am

    I assume you are using Rails 3 and jQuery (I’m not well-versed in prototype). It’s easy to switch jQuery for prototype in Rails 3: https://github.com/rails/jquery-ujs

    For the link:

    <a href="#" class="first_column_link" data-client-id="<%= client.id %>">Something</a>

    Using JavaScript and jQuery, write a function that sucks in links of class first_column_link (please rename to something more reasonable, by the way):

    $(function() {
      $('.first_column_link').bind('click', function() {
        $.getJSON('/clients/' + $(this).attr('data-client-id'), function(data) {
          // Populate the second column using the response in data
        });
      });
    });

    This doesn’t work on browsers that don’t support or have otherwise disabled JavaScript. Gracefully degrading would likely be a good idea, but without more context, I can’t advise you how to best do it.

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

Sidebar

Related Questions

Lets say I have a list of 1,000,000 users where their unique identifier is
Let's say I have a list of an object like this: var users =
Say I have a controller that returns a list of users. The users are
Let's say I have a list of User objects with two properties...ID and Name
lets say i have a list of urls such as http://stackexchange.com https://stackoverflow.com/users/login http://careers.stackoverflow.com http://chat.stackoverflow.com
Say I have default content on the left side of my application, which is
Lets say I have the following one-to-many relationship: Site has many Users User belongs
let us say I have a list page of users and you can sort
Say I have a list as follows: item1 item2 item3 Is there a CSS
Say I have a list of all Projects , and that I group them

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.