Awesome... thanks Siva ! That gives me the motivation to just strip out the Ajax, as the window.location trick is uuuugly :)<br>Thanks again !<br><br><br><br><div><span class="gmail_quote">On 2/1/06, <b class="gmail_sendername">
Siva Jagadeesan</b> <<a href="mailto:sivajagdev@gmail.com">sivajagdev@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Yah I never got that to work.. so I gave up and took out Ajax call and made it a simple call<div><span class="e" id="q_10926b28e5132311_1"><br><br>
<div><span class="gmail_quote">On 2/1/06, <b class="gmail_sendername">Dylan Stamat</b> <<a href="mailto:dylans@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">dylans@gmail.com</a>> wrote:
</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">So, if anybody is interested...<br><br>Since I'm using an ":update" within the form_remote_tag, the template being rendered from the "redirect_to" is simply being displayed on the same page as the login form.
<br><br>So, still not working :)
<div><span><br><br><br><br>
<div><span class="gmail_quote">On 1/30/06, <b class="gmail_sendername">Dylan Stamat</b> <<a href="mailto:dylans@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">dylans@gmail.com</a>> wrote:
</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Adam, I thought that would work too... but it doesn't ! Setup a little test, and you'll see what I mean.
<br>Doing this window.location thing is all I can get to work. Check this thread out:<br><a href="http://thread.gmane.org/gmane.comp.lang.ruby.rails/14202" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://thread.gmane.org/gmane.comp.lang.ruby.rails/14202</a>
<div><span><br><br><br><br>
<div><span class="gmail_quote">On 1/30/06, <b class="gmail_sendername">Adam Denenberg</b> <<a href="mailto:straightflush@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> straightflush@gmail.com
</a>> wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">redirect_to :controller => "admin" , :action => "index" <br><br>adam
<br><br>On 1/30/06, Dylan Stamat <<a href="mailto:dylans@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">dylans@gmail.com</a>> wrote:<br>> I would like to have a login box setup so that if incorrect info is
<br>> submitted, the box "shakes" via Effect.Shake.<br>> If the correct information is submitted, I want to redirect to some other<br>> page.<br>><br>> The only solution I've found is the following, which is pretty ugly, as it
<br>> 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 =><br>> evaluate_remote_response, <br>> :url =><br>> {: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%27;" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://0.0.0.0:3000/admin';</a>")<br>> else<br>> render(:layout => false, :action => 'bad_login') <-- which is just a <br>> template with an Effect.Shake<br>><br>><br>> So, is there any other way to do a redirect from an action via a
<br>> form_remote_tag than using the window.location hack ?<br>> Crossing my fingers there is a way :)<br>> TIA ! <br>><br>> _______________________________________________<br>> Rails mailing list<br>>
<a href="mailto:Rails@lists.rubyonrails.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Rails@lists.rubyonrails.org </a><br>> <a href="http://lists.rubyonrails.org/mailman/listinfo/rails" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://lists.rubyonrails.org/mailman/listinfo/rails</a><br>><br>><br>><br>_______________________________________________<br>Rails mailing list<br><a href="mailto:Rails@lists.rubyonrails.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Rails@lists.rubyonrails.org </a><br><a href="http://lists.rubyonrails.org/mailman/listinfo/rails" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.rubyonrails.org/mailman/listinfo/rails
</a>
<br></blockquote></div><br></span></div></blockquote></div><br></span></div><br>_______________________________________________<br>Rails mailing list<br><a href="mailto:Rails@lists.rubyonrails.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Rails@lists.rubyonrails.org</a><br><a href="http://lists.rubyonrails.org/mailman/listinfo/rails" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.rubyonrails.org/mailman/listinfo/rails</a>
<br><br><br></blockquote></div><br><br clear="all"><br></span></div><span class="sg">-- <br><br>Rgds,<br>--Siva Jagadeesan<br><a href="http://www.varcasa.com/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.varcasa.com/</a><br>My First Rails Project. Powered by Typo and soon by RForum too
</span><br>_______________________________________________<br>Rails mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Rails@lists.rubyonrails.org">Rails@lists.rubyonrails.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.rubyonrails.org/mailman/listinfo/rails" target="_blank">
http://lists.rubyonrails.org/mailman/listinfo/rails</a><br><br><br></blockquote></div><br>