Two redirect_to from one action

I have a ‘login’ action that I would like to simultaneously move to the
next page and to open a separate popup window for a time clock function.

I can easily create a popup window from a clickable link but
essentially, what I want it to do is…

redirect_to(:controller => “main_tabnav” )
and
render( :controller => ‘in_outs’, :action => ‘edit_io’,
:template => ‘in_outs/edit_io’, :id => session[:user_id],
:popup => [‘new_window’, ‘height=324,width=680’])

though the last part doesn’t work because there is some setup in in_outs
controller that I would like to also execute so I would actually want it
to run ‘edit_io’ method of InOutsController but it’s obvious that I will
never be able to execute both ‘redirect_to’ statements within one
method.

Any suggestions?


Craig W. [email protected]

:popup => [‘new_window’, ‘height=324,width=680’])

though the last part doesn’t work because there is some setup in in_outs
controller that I would like to also execute so I would actually want it
to run ‘edit_io’ method of InOutsController but it’s obvious that I will
never be able to execute both ‘redirect_to’ statements within one
method.

Any suggestions?

Send back a page of javascript that opens the new window (which kicks
off
your edit_io request) as well as replaces the current window with your
‘next page’.

-philip

On Wed, 2007-04-04 at 15:52 -0700, Philip H. wrote:

:popup => [‘new_window’, ‘height=324,width=680’])
your edit_io request) as well as replaces the current window with your
‘next page’.


OK - makes sense…any pointers off the top of your head for javascripts
to do this - I see all sorts of little issues of having to pass
variables for the ‘session[:user_id’] variable for my edit_io method and
I am fairly certain that this is suggestion infers a non-rails solution.


Craig W. [email protected]