Anyway to do this without using an rjs file? Otherwise, I''m guessing AJAX is the only way. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
You can reload the main window. You can do this by redirecting to the action that displays the main window after processing the popup post request. On Jan 9, 11:47 am, Corey Murphy <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Anyway to do this without using an rjs file? Otherwise, I''m guessing > AJAX is the only way. > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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 9 Jan 2008, at 17:48, eggman2001 wrote:> > You can reload the main window. You can do this by redirecting to the > action that displays the main window after processing the popup post > request. > > On Jan 9, 11:47 am, Corey Murphy <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: >> Anyway to do this without using an rjs file? Otherwise, I''m guessing >> AJAX is the only way.the child window can call functions from the parent window. I''ve got an app where the user can open a popup window, do some searching and when they''ve found something they like the look of, the button they click just does parent.some_function(...) Fred>> >> -- >> Posted viahttp://www.ruby-forum.com/. > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
eggman2001 wrote:> You can reload the main window. You can do this by redirecting to the > action that displays the main window after processing the popup post > request. > > On Jan 9, 11:47 am, Corey Murphy <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>This I''ve tried and the redirect ends up loading the correct screen but instead of refreshing or loading it in the main window, it loads it in the popup window instead. Here is the code: def processSelection if request.post? id = params[:id] redirect_to(:controller => ''screens'', :action => :new, :bbID => id) end end Am I doing something wrong? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On 9 Jan 2008, at 17:48, eggman2001 wrote: > >> >> You can reload the main window. You can do this by redirecting to the >> action that displays the main window after processing the popup post >> request. >> >> On Jan 9, 11:47 am, Corey Murphy <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> >> wrote: >>> Anyway to do this without using an rjs file? Otherwise, I''m guessing >>> AJAX is the only way. > > the child window can call functions from the parent window. I''ve got > an app where the user can open a popup window, do some searching and > when they''ve found something they like the look of, the button they > click just does parent.some_function(...) > > FredAre you just calling a method/function in the controller of the parent? Or are you actually posting form data to some method? I guess it wouldn''t matter, but either way you have to somehow close the popup. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 9 Jan 2008, at 18:44, Corey Murphy wrote:> > Frederick Cheung wrote: >> On 9 Jan 2008, at 17:48, eggman2001 wrote: >> >>> >>> You can reload the main window. You can do this by redirecting to >>> the >>> action that displays the main window after processing the popup post >>> request. >>> >>> On Jan 9, 11:47 am, Corey Murphy <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> >>> wrote: >>>> Anyway to do this without using an rjs file? Otherwise, I''m >>>> guessing >>>> AJAX is the only way. >> >> the child window can call functions from the parent window. I''ve got >> an app where the user can open a popup window, do some searching and >> when they''ve found something they like the look of, the button they >> click just does parent.some_function(...) >> >> Fred > > Are you just calling a method/function in the controller of the > parent? > Or are you actually posting form data to some method? I guess it > wouldn''t matter, but either way you have to somehow close the popup.Neither. Pure javascript here. you can call window.close to close yourself, and if on the parent you have <script type="text/javascript"> function fromChild(s){ alert("hello from parent" + s) } </script> Then you can call parent.fromChild(...) Fred --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---