I try to open a pdf file in a new window using the following code: <%= link_to document.name, :controller => ''member'', :action => :show_attachment, :id => document.id, :popup => [''new window'', ''width=800, height=700, left = 450, top = 100, resizable, scrollbars=yes'' ] %> but it opens the file in the same window. Any ideas why? Many thanks, -Albert -- 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 Feb 10, 2007, at 21:54 , albert wrote:> > I try to open a pdf file in a new window using the following code: > > <%= link_to document.name, :controller => ''member'', > :action => :show_attachment, :id => document.id, > :popup => [''new window'', ''width=800, height=700, left = 450, top = > 100, > resizable, scrollbars=yes'' ] %>You''re passing the :popup options to the url options hash. You want to pass it as part of the html_options hash, like this: <%= link_to document.name, {:controller => ''member'', :action => :show_attachment, :id => document.id}, :popup => [''new window'', ''width=800, height=700, left = 450, top = 100, resizable, scrollbars=yes'' ] %> -- Jakob Skjerning - http://mentalized.net --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> <%= link_to document.name, :controller => ''member'', > :action => :show_attachment, :id => document.id, > :popup => [''new window'', ''width=800, height=700, left = 450, top = 100, > resizable, scrollbars=yes'' ] %> > > but it opens the file in the same window. > Any ideas why? >I''ve found that IE (surprise) is a bit strange when it comes to poup titles. If the title contains any spaces then it will open in the same window. I''ve observed this behaviour on IE6 so, just in case, no more spaces in my popup windows'' titles. regards, javier ramirez -- -------- Estamos de estreno... si necesitas llevar el control de tus gastos visita http://www.gastosgem.com !!Es gratis!! --~--~---------~--~----~------------~-------~--~----~ 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 had the same problem. Check out this post - it solved the problem for me too. http://www.ruby-forum.com/topic/81000#190602 Shauna -- 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 -~----------~----~----~----~------~----~------~--~---