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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:02:40+00:00 2026-06-13T00:02:40+00:00

I have a form in a side bar, and when the form submits, I

  • 0

I have a form in a side bar, and when the form submits, I need to refresh only that particular partial from the side bar, not the entire page. The partial has a div id = “class-id” on it.

partial.html.haml

- if class
 // display some stuff
- else
  = form_for [Class.new], remote: true do |f| 
    .field
      = f.label :description
      = f.text_field :description      
    .actions
      = f.submit

I need to reload this partial after the submit is finished, so that the first if will be accessed.

Thanks

  • 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-13T00:02:41+00:00Added an answer on June 13, 2026 at 12:02 am

    Create a view file as your action name, for example. – suppose your action name is create in user controller then in your view/users folder create a file create.js.erb and write below code in that file.

    For jquery

    $('class or id name').html("<%= escape_javascript render(:partial => 'whatever your your partial') %>")
    

    For prototype

    page.replace_html "class or id name", :partial => "whatever your partial to update"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form on a lightbox, that form is server side validated with
I have a Django form that needs to do some client-side validation before submitting
I have a side navigation bar and when you click the links it submits
I have page of two columns with left bar. On the left side I
On my page http://kuerzer.de/UAGRb3tOQ I want to have only one scrolling bar at the
I have a registration form in the side bar of my web application. When
I have a form partial that is being called in a content_for :sidebar. This
I have web form with a panel which has form elements in side it.
I want to send the form data to server-side. I have two ways: Normal
I have form where user submits field. Field can have letters, numbers, and punctuation.

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.