athem
2008-Oct-10 04:31 UTC
How to close a popup and execute an xhr call to update the "opener" window?
Hi, I''m opening a popup window using: <%= link_to ''Click here to manage documents and photos for this vehicle'', { :action => ''manage_photos_documents_popup'' }, :popup => [ ''Manage Documents and Photos'', ''width=550, height=750, scrollbars=yes'' ] %> I need to close the popup and make an ajax call to an action updating a div in the window that opened the popup using either a button or link (on the popup, of course). It would be nice to be able to pass data back to the action that updates the div in the calling window. Any ideas on an approach for this? THANKS! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Youssef Chaker
2008-Oct-10 18:02 UTC
Re: How to close a popup and execute an xhr call to update the "opener" window?
check out this link: http://www.methods.co.nz/popup/popup.html On Oct 10, 12:31 am, athem <allan.m.mil...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I''m opening apopupwindowusing: > > <%= link_to ''Click here to manage documents and photos for this > vehicle'', { :action => ''manage_photos_documents_popup'' }, :popup=> > [ ''Manage Documents and Photos'', ''width=550, height=750, > scrollbars=yes'' ] %> > > I need toclosethepopupand make an ajaxcallto an action updating > a div in thewindowthat opened thepopupusing either a button or > link (on thepopup, of course). It would be nice to be able to pass > data back to the action that updates the div in the callingwindow. > > Any ideas on an approach for this? THANKS!--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---