athem
2008-Jul-28 06:38 UTC
How to render a template in a popup window from a controller action?
I''m trying to render a template in a popup window from a controller action. it would be equivalent to: <%= link_to ''Manage Documents and Photos'', { :action => ''manage_photos_documents_popup'' }, :popup => [ ''Manage Photos and Documents'', ''width=550, height=600'' ] %> except instead of opening the popup when the user clicks on a link, it would happen in response to a statement in a controller. I tried using an xhr request with something like: render :update do | page | page << "window.open(this.href,''Manage Photos and Documents'',''width=550, height=600'');return false;" end but with no result. Any suggestions for how to do 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 -~----------~----~----~----~------~----~------~--~---