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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:40:51+00:00 2026-06-07T19:40:51+00:00

I currently have two divs, one that contains a search bar and one that

  • 0

I currently have two divs, one that contains a search bar and one that contains a partial, as such:

<div class="search_div">
    <%= form_tag(barpage_outings_path, :method => :get, :id => 'bars_search_form', :remote => true ) do %>
        <div id="user_search" class="in-field">
            <%= text_field_tag('search', '', :id => 'search_field') %>
            <%= label_tag 'search_field', 'Search For Locations' %>
            <%= submit_tag "", :id => "search_button" %> 
        </div>
    <% end %>
</div>

<div id="bar_partial">
    <%= render(:partial => "bar_results") %>
</div>

It renders a partial just fine upon page load, but I’d like it to refresh the partials contents after each search submission.

I have the form bound to an AJAX call, like such:

$('#bars_search_form').bind('ajax:success', function(){

   $('#bar_partial').html("<%= escape_javascript(render(:partial => 'bar_results')).html_safe %>");

});

The problem is, instead of refreshing the partial, it just outputs my escape javascript command as plain text. Can anyone see what I’m doing wrong (or even if I’m going about this in the completely wrong way?)

  • 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-07T19:40:54+00:00Added an answer on June 7, 2026 at 7:40 pm

    Please Try this way:

    https://gist.github.com/2230354

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

Sidebar

Related Questions

I (currently) have two forms, one that needs to call the other. In other
I currently have two divs on my site: Notice that both have border [same
I have a nav bar on my site that is currently one color and
I currently have two SQL commands. One retrieves a list of unique IDs from
Currently I have two tests that each individually test for a button_click within a
Currently, I have 2 divs, each with a CSS class. They are directly below
I want to have a div that animates the currently active image out of
I have two divs. One is position:absolute (.buttonEffectWrapper), over the top of the other
I want a two-column div layout, where each one can have variable width e.g.
I have a page which has DIVs which contain short phrases (one-two words) of

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.