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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:03:33+00:00 2026-06-10T14:03:33+00:00

In my ruby on rails app, I am trying to allow a user to

  • 0

In my ruby on rails app, I am trying to allow a user to change a field on the screen and as a result, update the database.

A user is promoted with the following screen:

<td id="sb_user-<%=server.id%>" ondblclick="changeUser(<%= server.id %>);"><%= server.sb_user %></td>

enter image description here

When they double click on the sb_user field, a javascript function is called and changes the field to a textbox with a simple go button:

    <script type="text/javascript">
        function changeUser(id) {
            //Stop the auto refresh until user hits enter
            clearInterval(refreshInterval);
            $("#sb_user-"+id).html("<form name='user'><div class='input-append'><input name='user_input' class='span1' id='appendedInputButton' size='16' type='text'/><button class='btn' type='button'>Go!</button></form></div>"); 
        }
    </script>

enter image description here

When a user enters text into the textbox and clicks go, I need it so that the database field server.sb_user is updated to whatever the user entered in that field.

Anyone have suggestions on how to do this?

  • 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-10T14:03:35+00:00Added an answer on June 10, 2026 at 2:03 pm

    What you are searching for is in place editing. Theres a railscast for that:

    http://railscasts.com/episodes/302-in-place-editing

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

Sidebar

Related Questions

I'm trying to create a User model for my Ruby on Rails app that
In my ruby on rails app I am trying to use a Prototype Form.Element.Observer
I am trying to implement ruby on rails app using Capistrano, I am running
Finally deployed my ruby on rails 3.2 app but when trying to open it
I'm new to ruby/rails and trying to build a simple Projects / Tags app
In my ruby(1.9.3) on rails (3.1) app I'm trying to set some conditional behavior
In a Rails 3.0 (Ruby 1.9.2) app I'm trying to encrypt some data using
I'm a new ruby/rails user trying to get my mac set up for the
I am trying to design my ruby on rails app at the moment. I
I have been trying to get a ruby on rails app going on my

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.