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?

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?

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

> 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?

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'.