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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:39:51+00:00 2026-05-30T02:39:51+00:00

The flash method only shows the message after the page reloads… what do I

  • 0

The flash method only shows the message after the page reloads… what do I do to get it to appear when I’m using :remote => true?

  • 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-30T02:39:52+00:00Added an answer on May 30, 2026 at 2:39 am

    if you are using :remote => true you are actually doing Ajax request.
    in that case, the flash will not work.

    What you need is to have a js function that mimics that flash message.

    I usually have that: (Mootools, but you probably get the idea)

    showMessage: function(message, style, addReload)
        {
            var class_name = style + "_message message";
    
            var flash = $("flash_message");
    
            if (flash) {
                flash.dispose();
            }
    
            flashElement = new Element("div", {
                id: 'flash_message'
            });
            flashElement.set('class', class_name);
    
            var strong = new Element('strong', { 
                                    html: message
                                    });
    
            if(addReload)
            {
                strong.adopt(
                                new Element("a", {href: window.location, html: 'Reload'})
                            );
            }
    
            flashElement.adopt(
                                strong
                            );
    
    
            flashElement.inject($("mainPageContainer"));
            Site.show_message();
        },
    

    Whenever I use :remote => true, I have that in the js view

    <% flash.discard %>
    Dashboard.showMessage('Comment added and was sent to clients', 'notice');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I understand that .NET FileStream's Flush method only writes the current buffer to disk,
Given the following Flash method: function sendToJava(name:String, ... args) { ExternalInterface.call(sendCommand, name, args); }
There are too many method for embedding flash in html, which way is the
How to call AS2 method from NextFrame(or any other frame) in Flash? Say you
My flash code: var request=new URLRequest('http://localhost/test.php'); request.method = URLRequestMethod.POST; var data = new URLVariables();
I am sending emails with the following method: class Communicate < ActionMailer::Base def message(sub,msg,people)
Is there some method to issue a screen capture(browser window content only) from the
I need an application to run only from a specific USB flash drive. I
I've got to access text inside a flash object. The preferred method is via
I get this error when trying to register a new user. NoMethodError (undefined method

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.