On Tue, Dec 20, 2011 at 5:37 PM, JavierQQ
<jquarites-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi,
>
> I want to do some pop-up/modal dialog (I''m not sure
what''s the real
> name of it :/) with a form inside
> and after save that data I want that the form close...
>
> As a example I''ve done this
>
> <%= link_to "Add more",
> {:controller=>"users", :action=>"new"}, :remote
=> true, :id => "pop"
> %>
>
> and this
> $(document).ready(function{
> $("pop").fancybox();
> });
>
> But theres a problem... after I save, inside the popup/modal appears
> an error ... and when I close it, I have to hit refresh in order to
> see what''s been added.
>
> I know that I have to use some javascript in order to make the new
> element appear on the table, but how can I make that the modal/popup
> disappears after save?
>
>
Fancybox has a function for this:
$.fancybox.close
>
> Thanks in advance
>
>
> Javier Q.
>
> --
> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
>
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.