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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:06:04+00:00 2026-05-23T13:06:04+00:00

The email still gets sent and delivered, but still no flash message. form: <%=

  • 0

The email still gets sent and delivered, but still no flash message.

form:

    <%= form_for :fb_comment, :url => update_reply_feedback_path, :html => { :id => "reply" }, :remote => true do |f| %>
        <%= f.text_area :reply, :size => '66x7' %><br>
        <center><%= f.submit "Send Reply"  %></center>
    <% end %>

in the layout file:

<%- flash.each do |name, msg| -%>
   <%= content_tag :div, msg, :id => "flash_#{name}" %>
<%- end -%>

in controller:

def reply2_feedback
   ...
   flash.now[:notice] = 'Reply was successfully sent.'
   respond_to do |format|
      format.html {}
      format.js
   end 
end

in application.js:

jQuery.ajaxSetup({
   'beforeSend': function(xhr) {xhr.setRequestHeader("Accept", "text/javascript")}
})

$(document).ready(function() {
   $("#reply").submit(function() {
      $.post($(this).attr("action"), $(this).serialize(), null, "script");
      return false;
   })
})

update_reply.js.erb:

$("#flash").html('<div class="notice_alert"><%= escape_javascript(flash.delete(:notice)) %></div>');

Thank you.

  • 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-23T13:06:05+00:00Added an answer on May 23, 2026 at 1:06 pm

    After 58 views without a solution i decided to cave to meet the pressure of a deadline and settle for second best by adding a simple alert to the javascript. If anyone does happen upon this question and provides a solution that makes the flash message work, then i’ll switch the answer to you. Thanks to those who gave it a shot.

    $(document).ready(function() {
        $("#reply").submit(function() {
            $.post($(this).attr("action"), $(this).serialize(), null, "script");
            alert("Your reply was emailed.");
            return false;
        })
    })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to generate html (for the body of an email message) specific to
I'm currently modifying my regex for this: Extracting email addresses in an html block
On my client's website (domain.com) we have a contact form which sends an email
First of all, this is probably a stupid question, but I'm new and still
Although there are still bots harvesting emails, I'm wondering if you hide email addresses
Do you guys see any issues with this C# code? It gets email notifications
How come my matching of the two email addresses still claims they don't match
Sending Email in Android using JavaMail API without using the default/built-in app I'm trying
is there a scalable email service where you only pay for the emails that
Because some email clients don't properly render external stylesheets (or even styles within 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.