On Tue, Dec 20, 2011 at 5:37 PM, JavierQQ <[email protected]> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to