You could use RJS to update an element with the enclosed javascript.
The browser should execute the javascript (I''ve done this with
redirection on remote forms on http://heartbeat.highgroove.com).
- Derek
On 6/23/06, shai <shaiguitar@yahoo.com> wrote:> Hi all,
>
> does anyone know of a rails command i can use so that at the end of an
> action, the page will close at termination? (i.e it would be the
> equivalent of a javascript <script> window.close </script> and
would
> look something like this
>
> def create
> @contact = Contact.new(params[:contact])
> if @contact.save
> :action => :closewindow ## or something like this? ##
> else
> render_text ''you have failed...''
> end
> end
>
>
> thanks in advance,
>
> s
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Derek Haynes
HighGroove Studios - http://www.highgroove.com
San Mateo, CA | Atlanta, GA
Keeping it Simple.
650.276.0908