I have searched high and low on this topic. I''ve tried a couple of the plugins (DOM Popup kit came closer to helping me than anything). I thought I was getting close, but my problem now is passing parameters. Here''s what I''m trying to do: I have a navigation bar with links on it. I want to popup some of them, so I tried this: <script type="text/javascript"> function test() { window.showModalDialog("../note/editornew", ":text => ''Case''", "center:yes; dialogHeight:600px; dialogWidth:900px"); } </script> <%= link_to "Case Notes", {:text => ''Case''}, :onclick => "test()" %> | I need to pass in that "Case" text. The Note controller evaluates that param to decide if the note is an Event note or a Case note. But I can''t access that param in the controller via Javascript. Why is this so difficult?? Why isn''t something SIMPLE like this available?? <%= link_to "Case Notes", {:controller => "note", :action => "editornew", :text => ''Case''}, \ :popup => [''Notes'', ''width = 800, height = 550'', ''resizable yes'', ''scrollbars = yes'', ''modal = true''] %> If anyone has any ideas or suggestions on how I can get at those parameters in the controller, or another popup suggestion entirely, I''d be VERY appreciative. I''m so frustrated right now. Thanks much! ~Ali --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi Ali, On Wed, 2009-04-01 at 16:52 -0700, Ali wrote:> If anyone has any ideas or suggestions on how I can get at those > parameters in the controller, or another popup suggestion entirely, > I''d be VERY appreciative. I''m so frustrated right now.Have you considered a lightbox-style approach? Best regards, Bill --~--~---------~--~----~------------~-------~--~----~ 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 Apr 2, 8:09 am, bill walton <bwalton...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi Ali, > > Have you considered a lightbox-style approach? > > Best regards, > BillI had looked into that approach a little bit, but from what I''ve seen, isn''t that mostly for housing image popups? I need my popup to act just like a ROR form -- create, update, etc. Can a lightbox approach handle that, or is it more for display purposes? Thank you!! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Thu, 2009-04-02 at 08:47 -0700, Ali wrote:> On Apr 2, 8:09 am, bill walton <bwalton...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi Ali, > > > > Have you considered a lightbox-style approach? > > > > Best regards, > > Bill > > I had looked into that approach a little bit, but from what I''ve seen, > isn''t that mostly for housing image popups? I need my popup to act > just like a ROR form -- create, update, etc. Can a lightbox approach > handle that, or is it more for display purposes?I''m using Craig Ambrose''s RedBox plugin. It''s a Ruby implementation of Lightbox. (http:://blog.craigambrose.com/articles/2006/08/16/redbox-a-rails-compatible-lightbox) With Redbox, the ''lightbox'' window can house anything; including forms. A couple of things that tripped me up a little: 1) The RedBox method is invoked via XHR, but it renders a straight .rhtml partial. 2) You need to make sure the partial has a containing <div> that''s got height and width styled (CSS) to fit within the RedBox window. Otherwise you''ll get a blank display where you expected content. I think the ''difficulty'' related to non-image content is related to whether or not the dimensions of the ''bounding box'' can be known or have to be calculated. Anyway, I''ve found RedBox to be a very useful tool. HTH, Bill --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Try this link http://www.stickmanlabs.com/lightwindow/. I have used lightwindow to display images.Hope it will work for you.In this you can submit a form and display images,play video,etc. ------------------------------------- On Apr 3, 4:33 am, bill walton <bwalton...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Thu, 2009-04-02 at 08:47 -0700, Ali wrote: > > On Apr 2, 8:09 am, bill walton <bwalton...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi Ali, > > > > Have you considered a lightbox-style approach? > > > > Best regards, > > > Bill > > > I had looked into that approach a little bit, but from what I''ve seen, > > isn''t that mostly for housing image popups? I need my popup to act > > just like a ROR form -- create, update, etc. Can a lightbox approach > > handle that, or is it more for display purposes? > > I''m using Craig Ambrose''s RedBox plugin. It''s a Ruby implementation of > Lightbox. > > (http:://blog.craigambrose.com/articles/2006/08/16/redbox-a-rails-compatible-lightbox) > > With Redbox, the ''lightbox'' window can house anything; including forms. > > A couple of things that tripped me up a little: > > 1) The RedBox method is invoked via XHR, but it renders a > straight .rhtml partial. > > 2) You need to make sure the partial has a containing <div> that''s got > height and width styled (CSS) to fit within the RedBox window. > Otherwise you''ll get a blank display where you expected content. I > think the ''difficulty'' related to non-image content is related to > whether or not the dimensions of the ''bounding box'' can be known or have > to be calculated. Anyway, I''ve found RedBox to be a very useful tool. > > HTH, > Bill--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Redbox looks like it might work because it utilizes link_to and hopefully that means I can pass params. However, that link you posted, Bill, isn''t allowing me to install the plugin. Don''t suppose you have another means of obtaining the plugin files? It''s only three files, correct? Maybe you could just email them to me! lol On Apr 3, 9:01 am, deepali_k <dipu.kherud...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Try this linkhttp://www.stickmanlabs.com/lightwindow/. I have used > lightwindow to display images.Hope it will work for you.In this you > can submit a form and display images,play video,etc. > ------------------------------------- > > On Apr 3, 4:33 am, bill walton <bwalton...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > On Thu, 2009-04-02 at 08:47 -0700, Ali wrote: > > > On Apr 2, 8:09 am, bill walton <bwalton...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hi Ali, > > > > > Have you considered a lightbox-style approach? > > > > > Best regards, > > > > Bill > > > > I had looked into that approach a little bit, but from what I''ve seen, > > > isn''t that mostly for housing image popups? I need my popup to act > > > just like a ROR form -- create, update, etc. Can a lightbox approach > > > handle that, or is it more for display purposes? > > > I''m using Craig Ambrose''s RedBox plugin. It''s a Ruby implementation of > > Lightbox. > > > (http:://blog.craigambrose.com/articles/2006/08/16/redbox-a-rails-compatible-lightbox) > > > With Redbox, the ''lightbox'' window can house anything; including forms. > > > A couple of things that tripped me up a little: > > > 1) The RedBox method is invoked via XHR, but it renders a > > straight .rhtml partial. > > > 2) You need to make sure the partial has a containing <div> that''s got > > height and width styled (CSS) to fit within the RedBox window. > > Otherwise you''ll get a blank display where you expected content. I > > think the ''difficulty'' related to non-image content is related to > > whether or not the dimensions of the ''bounding box'' can be known or have > > to be calculated. Anyway, I''ve found RedBox to be a very useful tool. > > > HTH, > > Bill- Hide quoted text - > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
script/plugin install svn://rubyforge.org/var/svn/ambroseplugins/redbox try sudo script/plugin install svn://rubyforge.org/var/svn/ambroseplugins/redbox if that doesnt work. if neither work, ill mail the files over to u. like bill said, redbox is good to go. The styling/resizing is the problem. In a way, thats good cos it forces you to dive into the code and see whats going on so you can correct it. Havent found a way to resize it for forms dynamically though (like the Lightbox does for images). I just place is it rigidly by specifying the x,y coordinates on the page. If anyone''s got tips on tweaking redbox to resize for forms, it''d be great! On Apr 3, 10:29 pm, Ali <awilli...-KQhSGARDxiOeQVqA2Ba1Pg@public.gmane.org> wrote:> Redbox looks like it might work because it utilizes link_to and > hopefully that means I can pass params. However, that link you > posted, Bill, isn''t allowing me to install the plugin. Don''t suppose > you have another means of obtaining the plugin files? > > It''s only three files, correct? Maybe you could just email them to > me! lol > > On Apr 3, 9:01 am, deepali_k <dipu.kherud...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Try this linkhttp://www.stickmanlabs.com/lightwindow/. I have used > > lightwindow to display images.Hope it will work for you.In this you > > can submit a form and display images,play video,etc. > > ------------------------------------- > > > On Apr 3, 4:33 am, bill walton <bwalton...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > On Thu, 2009-04-02 at 08:47 -0700, Ali wrote: > > > > On Apr 2, 8:09 am, bill walton <bwalton...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi Ali, > > > > > > Have you considered a lightbox-style approach? > > > > > > Best regards, > > > > > Bill > > > > > I had looked into that approach a little bit, but from what I''ve seen, > > > > isn''t that mostly for housing image popups? I need my popup to act > > > > just like a ROR form -- create, update, etc. Can a lightbox approach > > > > handle that, or is it more for display purposes? > > > > I''m using Craig Ambrose''s RedBox plugin. It''s a Ruby implementation of > > > Lightbox. > > > > (http:://blog.craigambrose.com/articles/2006/08/16/redbox-a-rails-compatibl e-lightbox) > > > > With Redbox, the ''lightbox'' window can house anything; including forms. > > > > A couple of things that tripped me up a little: > > > > 1) The RedBox method is invoked via XHR, but it renders a > > > straight .rhtml partial. > > > > 2) You need to make sure the partial has a containing <div> that''s got > > > height and width styled (CSS) to fit within the RedBox window. > > > Otherwise you''ll get a blank display where you expected content. I > > > think the ''difficulty'' related to non-image content is related to > > > whether or not the dimensions of the ''bounding box'' can be known or have > > > to be calculated. Anyway, I''ve found RedBox to be a very useful tool. > > > > HTH, > > > Bill- Hide quoted text - > > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---