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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:03:42+00:00 2026-05-30T07:03:42+00:00

I have limited screen space for a table that I’m displaying, so I’m showing

  • 0

I have limited screen space for a table that I’m displaying, so I’m showing a truncated view of a description field:

<td><%= simple_format car.description.truncate(200, :separator => ' ') %></td>

I need a mouse over or click event to generate a simple pop up window (an “alert”, a “tool tip”, a “dialog”, etc.) displaying the full contents of the car.description field.

I’m an admitted JS rookie. All the JS-Rails tutorials/information that I’m seeing are focused on unobtrusive JS, dealing mostly with AJAX/remote server interactions. I’m not seeing anything that helps understand how you can use data from your Rails application in rich JS UI features within your views. I saw a tool tip gem, but with that gem, tool tip content is statically generated, and tool tips are held in their own table. It provides no way to generate a tool tip on the fly, based on a field pulled from the database.

Is there some very, very simple way to have JS pop-up the text held in a Rails field?

  • 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-30T07:03:44+00:00Added an answer on May 30, 2026 at 7:03 am

    I created a dummy rails project @ https://github.com/rahul/SO_9347471. I used the modal library provided by twitter’s bootstrap @ http://twitter.github.com/bootstrap/index.html.

    Download that project and,

    1. bundle install
    2. rake db:migrate
    3. rake db:seed
    4. rails server
    5. hit localhost:3000 in your browser

    I created a modal div for each car and when the bootstrap javascript library loads, it converts all such divs into bootstrap modals (and hides them, waiting for a user to click on the truncated text)

    ====================================

    Take a look a

    http://jqueryui.com/demos/dialog/

    and then

    http://twitter.github.com/bootstrap/javascript.html#modals

    They contain an easy to follow documentation to help you get started. Let me know if you need more clarification.

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

Sidebar

Related Questions

I have an application with limited screen space, so I'm trying to conserve some
I sometimes need to use Visual Studio when I have limited screen real estate
For example I have limited space and I want the submit button to appear
I have an jQuery.autocomplete field presenting a limited range of decimal numbers. Ex: var
I have a button on my home screen that will add an edit text
I have a quite complex View build-up, and as a part of that, I
EDITED with solution (below...) I have a Splash screen that is packaged into it's
I have limited experience with .net. My app throws an error this.dateTimeFormat is undefined
I have limited knowledge of Java-based technologies, and for business enforced reasons, I may
As everybody knows, you have limited precision when you use printf to output the

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.