I would like to have a login box setup so that if incorrect info is submitted, the box "shakes" via Effect.Shake.<br>If the correct information is submitted, I want to redirect to some other page.<br><br>The only solution I've found is the following, which is pretty ugly, as it displays the javascript I'm invoking on the page prior to the redirect.
<br>Here is the code:<br><br><br>The Form<br>============<br><%= form_remote_tag(:update => 'message',<br> :complete => evaluate_remote_response, <br> :url => {:controller => 'login', :action => 'login'}) %>
<br><br>The Action<br>============<br>if logged_in<br> render(:text => "window.location.href = '<a href="http://0.0.0.0:3000/admin';">http://0.0.0.0:3000/admin';</a>")<br>else<br> render(:layout => false, :action => 'bad_login') <-- which is just a template with an
Effect.Shake<br><br><br>So, is there any other way to do a redirect from an action via a form_remote_tag than using the window.location hack ?<br>Crossing my fingers there is a way :)<br>TIA !<br>