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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:23:19+00:00 2026-05-23T06:23:19+00:00

I’m still a beginner at web development. It’s not my profession. So go easy.

  • 0

I’m still a beginner at web development. It’s not my profession. So go easy.

I started building a rails app today, and realized it would make my application so much better if I could get certain links to display in a separate div instead of a new page, or refreshing the entire page. I’m not quite sure how to search for this, and I keep chasing red herrings with google.

Basically, I have a list in a div on the left side of the page, and when one item from that list is clicked, it should appear in the right div. (Nothing else on the page need be changed)

That’s really as simple as it is. Do I need to use Javascript for this? Can I get away with the rails js defaults, or should I be using JQuery?

Is there a way to do this without javascript? I really just need a push in the right direction here, I’m tired of not even knowing how to search for this, or what documentation I should be reading.

Like I said, go easy, and you should just go ahead and err to the side of caution, and assume I know nothing. Seriously. 🙂

Thanks in advance,

-Kevin

(By the way, I’m developing with Rails 3)

  • 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-23T06:23:21+00:00Added an answer on May 23, 2026 at 6:23 am

    Create your views (along with controllers) to be shown inside the div for each item on the left menu. Lets say we have the following structure now:

    • Item1 (Clicking on it will fetch:
      http://myapp.com/item1)
    • Item2 (Clicking on it will fetch:
      http://myapp.com/item2)

    and so on…
    make sure you only render the html to be put inside your content div. Should not include <head> <body> etc. tags

    In your main page you may have your markup like this >

    <div id="leftMenu">
    <a href="http://myapp.com/item1">Item 1</a>
    <a href="http://myapp.com/item2">Item 2</a>
    </div>
    
    <div id="content">
    Please click on an item on the left menu to load content here
    </div>
    

    Finally, add the following Javascript (you’ll need jQuery; trust me it’s a good decision).

    $("#leftMenu a").click(function () {
    
       $("#content").load($(this).attr("href")); //load html from the url and put it in the #content element
    
       return false; //prevent the default href action
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

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.