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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:40:08+00:00 2026-05-19T10:40:08+00:00

I am developing rails 3 application (I am newbie in Rails). Currently, I have

  • 0

I am developing rails 3 application (I am newbie in Rails).

Currently, I have a form (use “form_for“) for submit, there is a div area under the form. What I want is when user click the ‘submit‘ button of the form, based on the user input data in the form, application will first go to the database to retrieve and organize some data, then the div area under the form will be rendered with the organized data.

That’s the content of the div area is rendered dynamically based on user’s input in the form, and the div render happens when user click “submit” form button .

The index.html.haml:

=form_for :myform do |form|
  = ...
  = ...
  =form.submit "submit"

%div.result
  /dynamic content to be rendered here, when user submit the form
  =render :partial 'result'

I think my form submission should first go to run a controller method to organize the data from Database, and what’s the next step I should do? As you noticed from the above code, I have a partial there under div, I would like to update the ‘result‘ partial when user submit form, but how to implement 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-05-19T10:40:09+00:00Added an answer on May 19, 2026 at 10:40 am

    examples of how you may update your page in response to ajax polling

    #some_controller.rb
    
    def your_action
    
    end
    
    # javascript erb file. views/some_controller/your_action.js.erb
    
    
    $('div.result').html('<%= escape_javascript(render :partial => 'your_action' -%>');
    
    
    # _your_action.html.haml
    = @dynamic_data
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the Rails application I’m currently developing I have many request models. We are
I'm developing Rails application and I have to use authentication. I installed devise gem
I am currently developing a Rails application using a database that was designed before
I am developing a Rails application and would like to understand when to use
I am developing a Ruby on Rails application with multilingual support. Now I have
I have a Ruby on Rails application that I'm developing on my computer, which
I am currently developing a Rails application, I'm trying to units test it. I
I am developing a Rails 3 application from which I want to be able
I'm currently developing a Rails application to accept recurring billing using Chargify. I've installed
I started developing my rails application using sqlite. I have reached a point where

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.