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 White <craig-CnJ8jr4MGtxl57MIdRCFDg@public.gmane.org> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> 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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Wed, 2007-04-04 at 15:52 -0700, Philip Hallstrom wrote:> > 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''.---- 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 White <craig-CnJ8jr4MGtxl57MIdRCFDg@public.gmane.org> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---