Forum: Ruby on Rails form_remote_tag

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C4bfcc81ac9281cb905f38e97e4d4e0b?d=identicon&s=25 Shandy Nantz (snantz)
on 2009-02-04 16:22
I have this strange situation where I have a form and when you hit the
form button an indicator is supposed to flash at the bottom of the
screen and say something like 'Information Saved' or 'Information not
saved', whatever. The problem is that instead of flashing the message
when I submit the form I get a prompt box saying 'File Download' and I
am at a complete loss of why it is doing this. Here is my code:

View-
<% form_remote_tag :url => {:action => 'update_action',
   :id => params[:id]}, :complete => "new Effect.Appear('update_div');
   new Effect.Pulsate('update_div');" do -%>

<%= hidden_field(:user, :design) %>
<%= submit_tag 'Update Template' %>

<% end -%>'

Controller-
def update_action
  @account = params[:id]

  render :update do |page|
    page.replace_html 'update_div',
    :inline => '<b style = "color: red;">ARG</b>'
  end
end

It is pretty straight forward, but like I said I'm at a loss of why the
strange action. Any ideas? Thx,

-S
3131fcea0a711e5ad89c8d49cc9253b4?d=identicon&s=25 Julian Leviston (Guest)
on 2009-02-05 02:36
(Received via mailing list)
Do you mean a js alert?

Blog: http://random8.zenunit.com/
Learn rails: http://sensei.zenunit.com/

On 05/02/2009, at 2:22 AM, Shandy Nantz
<rails-mailing-list@andreas-s.net
This topic is locked and can not be replied to.