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 )
‘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 …
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 …
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.
Look for the :popup option.
– James
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.