On 25 Nov 2008, at 08:47, David wrote:
> > I have run into a problem using replace_html and fade together to > display an error message. The error message is displayed when a user > enters the wrong username or password and then fades away. The > problem is that if a user enters incorrectly again, the error is not > displayed again. I need someway of resetting the html element so that > I can replace it again. Here is the relevant code: > fading eventually marks the corresponding dom element as invisible. You'll need to show it again (page.show etc...) Fred > format.js do > render :update do |page| > page.form.reset 'login_form' > page.visual_effect(:fade, "login_error", :duration => 2) > page.replace_html 'login_error', "Username and password do not > match." > end > end > > any ideas? > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

