In my project, I have a need to do a popup window. When the user clicks on a link (in this case a picture - but the question refers to any link), I need to popup a page that has an expanded version of that item for the user to look at - while keeping the original page available at the same time. Is this possible using rails? If so, how? As always (I sound like a broken record here) Thanks in advance <the item above is for those who, like me, are old enough to remember records <g>) ---Michael -- 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 -~----------~----~----~----~------~----~------~--~---
>From Rails API Docs, link_to Examples:link_to "Busy loop", { :action => "busy" }, :popup => [''new_window'', ''height=300,width=600''] ''height=300,width=600'' is a string of JavaScript Propertiesfor the Popup, so you can define other JavaScript Properties for the popup as well. then define the "busy" action in your controller, and render a view for it. you might want to define a different layout for the popup as it should not use your default template with navigation and stuff ... def busy ...do stuff here... render :action => :busy, :layout => :popup end 3) then create 3.1) a popup.rb in your app/views/layout folder for the popup with the basic HTML strcuture (like you do in the application.rhtml layout and <%= content_for_layout %> you can re-use this layout for other popups... 3.2) a busy.rhtml view in the view/yourcontroller directory, which will render the content for the popup layout .... --~--~---------~--~----~------------~-------~--~----~ 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 11/10/06, Michael Satterwhite <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > In my project, I have a need to do a popup window. When the user clicks > on a link (in this case a picture - but the question refers to any > link), I need to popup a page that has an expanded version of that item > for the user to look at - while keeping the original page available at > the same time. > > Is this possible using rails? If so, how?Check the API. http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#M000378 Look for the :popup option. -- James --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---